nginx 配置

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;


    #upstream nacos {
       #server 192.168.0.213:8848;
       #server 192.168.0.214:8848;
       #server 192.168.0.215:8848;
       #server 192.168.0.216:8848;
    #}

    upstream auth{
       server 192.168.0.212:8765;
    }
    
    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   D:/html;
            index  index.html index.htm;
            proxy_read_timeout 300;
        }

       location /jwt/ {
            proxy_pass http://auth/jwt/;
        }

        location /api/ {
            proxy_pass http://auth/api/;
        }

        location /websocket/ {
            proxy_pass http://auth/api/admin/mq/;
        }

    location /image/ {
           root  D:/;
           autoindex on;
        }  

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

    }
}

你可能感兴趣的:(nginx,运维)