继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

Nginx简单配置

Alexpy
关注TA
已关注
手记 7
粉丝 0
获赞 8
http {

    include       mime.types;
    default_type  application/octet-stream;
    
    upstream nginx_test {
        server localhost:8080;
    }
    
    sendfile        on;
    keepalive_timeout  65;
    gzip  on;
    
    server {
        listen       80;
        server_name  alexpy.cn;
        location / {
            proxy_pass http://nginx_test;
            proxy_set_header Host $host;
            proxy_set_header X-Real_IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
}
打开App,阅读手记
1人推荐
发表评论
随时随地看视频慕课网APP