douyao1856 2018-11-16 01:09
浏览 205

nginx别名php 403

My webroot is /web/zjz, I want use http://new.ahsl.gov.cn/zjz/ to browse,but responses 403, I don't know where is the error, pls help me, thanks the nginx config is:

server {
    listen       80;
    server_name  new.ahsl.gov.cn www.ahsl.gov.cn;

    access_log  /var/log/nginx/www.test.gov.cn_access.log  main;
    root   /web/master;

    location ^~ /zjz/ {
        alias /web/zjz;

        location ~ \.php$ {
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  /web/zjz/$fastcgi_script_name;
                include        fastcgi_params;
            }
    }

    location / {
        index  index.html index.htm index.php;
    include /web/master/.htaccess;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    location ~ \.(jpg|png|gif)$ {
        expires 1h;
        gzip on;
    }
}
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥30 这是哪个作者做的宝宝起名网站
    • ¥60 版本过低apk如何修改可以兼容新的安卓系统
    • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
    • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
    • ¥50 有数据,怎么用matlab求全要素生产率
    • ¥15 TI的insta-spin例程
    • ¥15 完成下列问题完成下列问题
    • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
    • ¥15 YoloV5 第三方库的版本对照问题
    • ¥15 请完成下列相关问题!