Configuración general del sitio web html de nginx.conf

Configuración general del sitio web html de nginx.conf

server {
        listen       8086;//端口号
        server_name  shopadmin;//站点名
        root         "/usr/share/nginx/html/h5";站点文件所在位置

        # location / {
        # }

        location /api {            
             proxy_pass http://localhost:10010/;
             proxy_redirect default;
             proxy_set_header Host $host;
            proxy_set_header REMOTE-HOST $remote_addr;
            proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }

Supongo que te gusta

Origin blog.csdn.net/qq_44255146/article/details/115142658
Recomendado
Clasificación