天天看点

nginx php实例,nginx 下配置支持thinkphp 3.2.2 示例

示例:

server {

listen 80;

server_name dev.showapi.com;

root /data/www/showdoc;

location / {

index index.php index.html index.htm;

autoindex off;

if (!-e $request_filename) {

rewrite ^(.*)$ /index.php?s=$1 last;

break;

}

}

location ~ \.php {

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

include fastcgi.conf;

set $real_script_name $fastcgi_script_name;

if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {

set $real_script_name $1;

set $path_info $2;

}

fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;

fastcgi_param SCRIPT_NAME $real_script_name;

fastcgi_param PATH_INFO $path_info;

}

access_log /data/web_log/dev.showapi.com_access.log;

error_log /data/web_log/dev.showapi.com_error.log;

}

文章处于要试用一套程序,一位大神开发的showdoc ,由于程序是采用tp开发,只能研究下nginx下对于tp的配置.

打赏

nginx php实例,nginx 下配置支持thinkphp 3.2.2 示例
nginx php实例,nginx 下配置支持thinkphp 3.2.2 示例

微信扫一扫,打赏作者吧~

如果本篇文章对您有帮助,欢迎向博主进行赞助,赞助时请写上您的用户名。

支付宝直接捐助帐号[email protected] 感谢支持!

喜欢 (0)or分享 (0)