ngnix支持thinkphp

来源:互联网 发布:mysql slave status 编辑:程序博客网 时间:2024/05/01 18:57


 server {

       listen       80;

       server_name  api.chuangkit.com;

 

       charset utf8;

        try_files  $uri  /index.php$uri;

 

       location  ~ .+\.php($|/) {

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

                fastcgi_param  PATH_INFO $fastcgi_path_info;

                fastcgi_pass   127.0.0.1:9000;

                fastcgi_index  index.php;

                fastcgi_param  SCRIPT_FILENAME /usr/local/nginx/html/api/$fastcgi_script_name;

                include        fastcgi_params;

 

 

       }

 

        location / {

           root   html/api;

           index  index.html index.php;

       }

 

       }

 

}

0 0
原创粉丝点击