码迷,mamicode.com
首页 > 其他好文 > 详细

让nginx支持YII2的配置写法

时间:2016-08-04 19:47:47      阅读:984      评论:0      收藏:0      [点我收藏+]

标签:nginx yii2

        location ~* \.(ttf|ttc|otf|eot|woff)$ {

            add_header Access-Control-Allow-Origin *;

        }

        location / {

            index index.php;  

            if (!-e $request_filename){  

              rewrite ^/(.*) /index.php last;  

            }

        }


        location ~ \.php$ {

            include /opt/openresty/nginx/conf/fastcgi_params; 

            fastcgi_pass 127.0.0.1:9000;

            fastcgi_index index.php;

            fastcgi_param SCRIPT_FILENAME /var/www/html/yii2/web$fastcgi_script_name;

        }


本文出自 “编程艺术” 博客,请务必保留此出处http://itsart.blog.51cto.com/1005243/1834339

让nginx支持YII2的配置写法

标签:nginx yii2

原文地址:http://itsart.blog.51cto.com/1005243/1834339

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!