我有这样的目录结构:
/opt/mysite/www: F: index.html D: connect/ F: -- index.html F: -- page.html
使用URL http://www.mysite.io/connect,try_files会生成一个301到: http ://www.mysite.io:8080/connect /
为什么nginx附加监听端口?
server { listen 8080; server_name www.mysite.io; index index.htm index.html /index.htm; root /opt/mysite/www/; location / { try_files $uri $uri.html $uri/index.html =404; } }