window下nginx基本使用

下载nginx:http://nginx.org/
打开nginx:双击exe 或者 cmd窗口打开 : start nginx
配置文件 ./conf/nginx.conf(片段):
upstream tomcat_server{
server 127.0.0.1:6070;
}

server {
    listen       80;
    server_name  localhost;

    #charset koi8-r;

    #access_log  logs/host.access.log  main;

    location / {
       proxy_pass http://tomcat_server;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }

参考:https://www.cnblogs.com/jiangwangxiang/p/8481661.html

猜你喜欢

转载自blog.csdn.net/qq_36551344/article/details/82467253