zoukankan      html  css  js  c++  java
  • Nginx*关键配置

    欲通过127.0.0.1:8811(代理服务器)来访问127.0.0.1:8080地址上的(真实)服务器,需要如下配置,非常关键,摘录nginx.conf中的关键配置以供读者参考。不同操作系统上配置都大体相同。

      server {
            listen       8811;
            server_name  127.0.0.1;
    
            #charset koi8-r;
    
            #access_log  logs/host.access.log  main;
    
            location / {
                root   html;
                index  index.html index.htm;
                proxy_pass http://127.0.0.1:8080;
                # proxy_pass http://www.baidu.com; # page goes to Baidu while visiting 127.0.0.1:8811
            }
    
            #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;
            }
        }
    



    令附一个比较全面的 参考





    作者:艾孜尔江

  • 相关阅读:
    毕业论文格式
    2018.12.14
    关于百度搜索引擎的优缺点
    2018.12.13
    2018.12.12
    2018.12.11
    2108.12.10
    2018.12.9
    2018.12.8
    2018.12.7
  • 原文地址:https://www.cnblogs.com/ezhar/p/14409487.html
Copyright © 2011-2022 走看看