nginx 反向代理 学习记录

nginx 反向代理

Author : Janloong Do_O

tomcat 配置



        
        


        

nginx 配置

#user nobody
设置 为 user root

server {
        listen       80;
        server_name  www.aa.com;

    location / {
                #proxy_pass http://www.aa.com:8080/official-website/index.html;
                root   html/official-website;
                index  index.html;
            }

    location /manager {
        proxy_pass http://www.aa.com:8080/manager;
        root   html;
        index  index.html index.htm;
    }
}

server {
        listen       80;
        server_name  pay.aa.com;

    location /examples {
        proxy_pass http://pay.aa.com:8080/examples;
        #proxy_set_header           Host $host;
        #proxy_set_header  X-Real-IP  $remote_addr;
        #proxy_set_header           X-Forwarded-For $proxy_add_x_forwarded_for;
         #   client_max_body_size  100m;
            root   html;
            index  index.html index.htm;
        }
    }
  server {
            listen       80;
            server_name  demo.aa.com;

        location / {
                    root   html/mould-sht;
                    index  index.html;
                }
    }

你可能感兴趣的:(学习笔记,Linux,nginx)