Nginx

作者: 恒忏 | 来源:发表于2017-12-28 11:28 被阅读0次

    基本配置:

    server {
        listen 80;
        server_name www.your_domain_name.com your_domain_name.com;
        location /{
            proxy_redirect off;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://127.0.0.1:80;
        }
        access_log logs/yesilion_access.log;
    }
    
    server {
        listen 80;
        server_name your_domain_name.cn www.your_domain_name.cn;
        location /{
            proxy_redirect off;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://127.0.0.1:8044;
        }
        access_log logs/gogoko_access.log;
    }
    

    相关文章

      网友评论

          本文标题:Nginx

          本文链接:https://www.haomeiwen.com/subject/ddbmgxtx.html