直接在 /usr/local/nginx/conf/vhost 新建 conf 配置文件,添加以下代码
server {
listen 80;
server_name blog.404.st;
location / {
proxy_pass http://IP:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
index index.php index.html index.htm;
}
}
重启 nginx 服务
service nginx reload