首页 > Web开发 > 详细

yii2 url PrettyUrl 404问题

时间:2020-02-17 10:06:08      阅读:54      评论:0      收藏:0      [点我收藏+]
修改服务器配置:nginx.conf
server {
        charset utf-8;
        client_max_body_size 128M;
        listen          80;
        server_name     local.yii2test.com
        index           index.php index.html index.htm;
        root            /usr/local/nginx/html/yii2test/web;
 
        location ~ \.php$ {
            root           /usr/local/nginx/html/yii2test/web;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            include        fastcgi_params;
        }
        #yii框架使用代码
        location / {
            # Redirect everything that isn‘t a real file to index.php
            try_files $uri $uri/ /index.php?$args;
        }
 
        location ~ /\.ht {
                deny  all;
        }
    }

yii2 url PrettyUrl 404问题

原文:https://www.cnblogs.com/phplzx/p/12320364.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!