I am trying to install redmine on my Ubuntu 14.04 machine. I already have an nginx 1.8.1 server running so I need to use it with that. I have followed a bunch of tutorials on how to do it as I have zero experience with the ruby environment. After I installed and configured everything I get an error in nginx when I try to access the redmine instance:
2016/03/22 21:52:54 [crit] 6640#0: *253 connect() to unix:/var/sockets/thin.2.sock failed (2: No such file or directory) while connecting to upstream, client: <EDIT>, server: <EDIT>, request: "GET / HTTP/1.1", upstream: "http://unix:/var/sockets/thin.2.sock:/", host: "<EDIT>"
2016/03/22 21:52:54 [crit] 6640#0: *253 connect() to unix:/var/sockets/thin.1.sock failed (2: No such file or directory) while connecting to upstream, client: <EDIT>, server: <EDIT>, request: "GET / HTTP/1.1", upstream: "http://unix:/var/sockets/thin.1.sock:/", host: "<EDIT>"
2016/03/22 21:52:54 [crit] 6640#0: *253 connect() to unix:/var/sockets/thin.0.sock failed (2: No such file or directory) while connecting to upstream, client: <EDIT>, server: <EDIT>, request: "GET / HTTP/1.1", upstream: "http://unix:/var/sockets/thin.0.sock:/", host: "<EDIT>"
So, what I am doing now:
1. Start thin with three servers, as exemplified on this website:
$ sudo thin start -s3 --socket /var/sockets/thin.sock
Starting server on /var/sockets/thin.0.sock ...
Starting server on /var/sockets/thin.1.sock ...
Starting server on /var/sockets/thin.2.sock ...
- Restart nginx
The /var/sockets/
directory exists and for now I have given it chmod 777 permissions. Even though thin does not give any errors I cannot see any .sock files in there (maybe they are private?).
Also, here is my nginx host file:
upstream thin_cluster {
server unix:/var/sockets/thin.0.sock;
server unix:/var/sockets/thin.1.sock;
server unix:/var/sockets/thin.2.sock;
#server unix:/tmp/thin.3.sock;
#server unix:/tmp/thin.4.sock;
}
server {
listen 80;
server_name <EDIT>;
root /usr/share/redmine/public;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
if (-f $request_filename.html) {
rewrite (.*) $1.html break;
}
if (!-f $request_filename) {
proxy_pass http://thin_cluster;
break;
}
}
#error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root html;
#}
}