vim /etc/nginx/nginx.conf
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name www.scyouju.com;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
proxy_pass http://127.0.0.1:8888/;
rewrite ^/.*/$ / last; # Redirect everything to / (ex index.html) and let the JS router take care of the rest
rewrite ^([^.]*[^/])$ $1/ permanent; # Force trailing slash
}
}
nginx -s reload//重启
nginx -c /etc/nginx/nginx.conf//根据指定配置文件启动