I have two rails apps on my server. Each of them is running on a Thin server. I am also using NGINX. This is my NGINX configuration file:
server{
location /blog {
proxy_pass http://127.0.0.1:8082;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /website1 {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
"http://HOST/blog" => I get a 404 error (blank page)
"http://[HOST]/website1" => I get a 404 error from my Rails app, and on my app logs I get:
INFO -- : Started GET "/website1"
FATAL -- : ActionController::RoutingError (No route matches [GET] "/website1")
What is happening???
I tried setting the location of website 1 on "/" and blog on "/blog". In this case website1 works perfectly, but I still get a 404 on blog (blank page, not a rails one).
Any idea? Thank you for you help!