Configure the nginx.conf file

# 1, configure user root to prevent 30x user root; server { listen 80 default_server; listen [::]:80 default_server; server_name _; root /var/html/system; Add_header access-control-allow-origin * always; add_header Access-Control-Allow-Methods * always; add_header Access-Control-Allow-Headers * always; {proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://xx.xx.xx.xx:8080/; } location / { root /var/html/system; index index.html index.htm; }... }Copy the code