我在Nginx服务器上运行着Rails应用程序,在Unicorn上作为应用程序服务器运行。所有请求都可以正常处理,但是每次请求后我都收到错误“ 127.0.0.1”,不是有效的域。有什么想法我应该去哪里检查?
我试图在以前是localhost的nginx服务器设置中添加域名。
upstream app {
server unix:/home/deploy/project/shared/sockets/unicorn.sock fail_timeout=0;
}
server {
listen 80;
server_name *.mydomain;
root /home/deploy/project/current/public;
try_files $uri/index.html $uri @app;
location @app {
proxy_pass http://app;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}