【发布时间】:2018-08-07 03:26:28
【问题描述】:
这是我的服务器块 nginx 配置,但我不知道是什么错误。当我点击我的域名时,它给了我“404 Not Found”。 请帮忙
服务器{
listen 80;
listen [::]:80;
root /var/www/squareeducation.in/SE_WebApp/template/views/layouts;
index index.html index.htm index.nginx-debian.html default.hbs;
server_name www.squareeducation.in;
location / {
try_files $uri $uri.hbs/ =404;
proxy_pass 'http://127.0.0.1:3000';
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_cache_bypass $http_upgrade;
}
location ~ .*\.(img|gif|jpg|jpeg|png|bmp|swf|js|css)$ {
root /var/www/squareeducation.in/SE_WebApp/public;
try_files $uri $uri/ =404;
}
}
【问题讨论】: