nginx 本地配置-记录

2019-11-20  本文已影响0人  不是一只咸鱼
    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;
        location / {
            root   html;
            index  index.html index.htm;
        }
        location /stob-user {
            proxy_pass http://localhost:7070;
            proxy_set_header Host $proxy_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Rorwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Via "nginx";
        }
        location /stob-importer {
            proxy_pass http://localhost:7076;
            proxy_set_header Host $proxy_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Rorwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Via "nginx";
        }
        location /stob-exporter {
            proxy_pass http://localhost:7073;
            proxy_set_header Host $proxy_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Rorwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Via "nginx";
        }
        location /stob-order {
            proxy_pass http://localhost:7075;
            proxy_set_header Host $proxy_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Rorwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Via "nginx";
        }
        location /stob-product {
            proxy_pass http://localhost:7074;
            proxy_set_header Host $proxy_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Rorwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Via "nginx";
        }
        location /stob-sample {
            proxy_pass http://localhost:7071;
            proxy_set_header Host $proxy_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Rorwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Via "nginx";
}
        location /stob-cms {
            proxy_pass http://localhost:7072;
            proxy_set_header Host $proxy_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Rorwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Via "nginx";
        }

        #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;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }
上一篇下一篇

猜你喜欢

热点阅读