拽拽
管理员组

Nginx环境下配置webman框架的端口为80

server

    {

        listen 80;

        #listen [::]:80;

        server_name bztp.shyouhan.com ;

        index index.html index.htm index.php default.html default.htm default.php;

        root  /home/wwwroot/bztp.shyouhan.com/public;


        include rewrite/other.conf;

        #error_page   404   /404.html;


        # Deny access to PHP files in specific directory

        #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }


        include enable-php-pathinfo.conf;


        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$

        {

            expires      30d;

        }


        location ~ .*\.(js|css)?$

        {

            expires      12h;

        }


        location ~ /.well-known {

            allow all;

        }


        location ~ /\.

        {

            deny all;

        }


        location ^~ / {

        proxy_pass  http://bztp.shyouhan.com:8788/;  # 注:proxy_pass的结尾有/, -> 效果:会在请求时将/api/*后面的路径直接拼接到后面

  

    }





        access_log  /home/wwwlogs/bztp.shyouhan.com.log;

    }


#1楼
发帖时间:2021-1-15   |   查看数:0   |   回复数:1
拽拽
管理员组
location ^~ / {
       proxy_pass  http://127.0.0.1:8789/;  #proxy_pass的结尾有/
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "Upgrade";
       proxy_set_header X-Real-IP $remote_addr; #利用http头透传真实客户端ip
   }
2021-2-24 #2楼
游客组