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

nginx yii2配置文件

时间:2016-04-05 16:07:57      阅读:112      评论:0      收藏:0      [点我收藏+]

标签:

应用配置文件

server {

    listen 80;

        server_name local.core.api;

    root /Users/li/Documents/www/CoreAPI/;

    

    location / {

    index index.php;

    autoindex on;

                if (!-f $request_filename) {

rewrite (.*) /webroot/index.php;

}

    }

 

    location ~ ^(.+\.php)(.*)$  {

    #include /Users/edwardzhou/servers/nginx/conf/fastcgi.conf;

    fastcgi_intercept_errors on;

    fastcgi_pass 127.0.0.1:9000;

 

            set $document_root2 $document_root;

            if ($document_root2 ~ "^(.*\\\\).*?[\\\\|\/]\.\.\/(.*)$") { set $document_root2 $1$2; }

            if ($document_root2 ~ "^(.*\\\\).*?[\\\\|\/]\.\.\/(.*)$") { set $document_root2 $1$2; }

            if ($document_root2 ~ "^(.*\\\\).*?[\\\\|\/]\.\.\/(.*)$") { set $document_root2 $1$2; }

            if ($document_root2 ~ "^(.*\\\\).*?[\\\\|\/]\.\.\/(.*)$") { set $document_root2 $1$2; }

            if ($document_root2 ~ "^(.*\\\\).*?[\\\\|\/]\.\.\/(.*)$") { set $document_root2 $1$2; }

 

            fastcgi_split_path_info ^(.+\.php)(.*)$;

            fastcgi_param   SCRIPT_FILENAME $document_root2$fastcgi_script_name;

            fastcgi_param   PATH_INFO   $fastcgi_path_info;

            fastcgi_param   PATH_TRANSLATED $document_root2$fastcgi_path_info;

            include fastcgi_params;

            fastcgi_param  DOCUMENT_ROOT      $document_root2;

    }

    }

nginx yii2配置文件

标签:

原文地址:http://www.cnblogs.com/RainLi/p/5355084.html

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