/etc/nginx/sites-available/default内容如下:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/html;
proxy_set_header X-Forwarded-For $remote_addr;
location / {
proxy_pass http://127.0.0.1:9000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 400 403 404 497 https://$host$uri$args;
}
```