Nginx 新手快速配置 反向代理

61 阅读1分钟
worker_processes  1;

events {
    worker_connections  1024;
}

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

    sendfile        on;

    keepalive_timeout  65;

     server {
            listen       80;
            server_name  localhost;
    
            limit_rate_after 5m;
            limit_rate 512k;
            
            # 主要参数:root 文件地址;  index 访问的文件
            location / {
                root   D:\ja-web\apache-tomcat-8.5.37\webapps\ROOT;
                index  unLogIn.html index.htm;
            }
    
            error_page   500 502 503 504  /50x.html;
            location = /50x.html {
                root   html;
            }
        }
    }
}