windows下的nginx代理
下载nginx
解压就可以使用
在解压当前目录启动

以下是nginx.conf的配置
D:\nginx-1.16.1\conf

worker_processes  1;

events {
    worker_connections  1024;
}


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

    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       8081; #nginx服务器端口
        server_name  localhost;

        location / {
			proxy_pass  http://localhost:80;
			# proxy_pass 转发路径forward to tamcat
            root   html;
            index  index.html index.htm;
        }

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

无需重启加载nginx.conf

让nginx代理tomcat。这个我们使用8081端口为nginx的启动,端口未代理的时候,此时tomcat要启动


我们开启nginx之后

推荐博文 https://www.cnblogs.com/taiyonghai/p/9402734.html#4340261