0
このような私のプロジェクトデザインは、/team
のURLと/team/*
はember.js
を使用します。他にもrails
を使用して、私はnginxのconfの設定:私はember.jsとレールを使用すると、nginx confはどのように動作するのですか?
upstream project {
server unix:///tmp/project.sock;
}
server {
listen 80;
server_name www.project.io;
root /home/deploy/www/project_backend/current/public;
location/{
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
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://project;
break;
}
}
location /team {
alias /home/deploy/www/project_frontend;
try_files $uri $uri/ /index.html?/$request_uri;
}
}
をしかし、私は/team/
を使用してproject_frontend
インデックスと/team/check/
または/team/project/check
に行くページをレールに行くとき、これは、いくつかの問題を抱えていました。
私は.conf
の何が問題なのかよくわかりません、お手伝いできますか?ありがとう。