【发布时间】:2016-06-26 15:40:03
【问题描述】:
请帮我配置 nginx:我希望 nginx 返回 index.html 用于所有 URL,例如 10.10.256.142/、10.10.256.142/some_path 和 10.10.256.142/other_path/lala。问题:目前它只为10.10.256.142/ URL 返回index.html。
我的当前设置
listen 80;
server_name 10.10.256.142;
server_name_in_redirect off;
resolver 127.0.0.1;
location / {
error_page 405 =200 $uri;
root /some_path/project_dir;
index index.html index.htm;
}
location /websocket {
# ....
【问题讨论】: