nginx thinkphp配置
2023-03-29 23:03:03
127
{{single.collect_count}}
server {listen 80;server_namelocalhost;#charset koi8-r;access_loglogs/host.access.logmain;#root D:\web\\tp5\\tp5\\public;root D:/web/tp52/tp5/public;index index.php index.html index.htm;location / {if (!-e $request_filename) {rewrite^(.*)$/index.php?s=/$1last; #rewrite^(.*)$/index.phplast;只有加上?s=/$1,才能访问处index外的其他页面 break;} } location ~ \.php { include fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name; fastcgi_paramPATH_INFO$fastcgi_path_info; fastcgi_paramPATH_TRANSLATED$document_root$fastcgi_path_info; } }server {listen 7890;server_namelocalhost;#charset koi8-r;access_loglogs/host.access.logmain;#root D:\web\\biaodan\\public;root D:/web/biaodan/public;index index.php index.html index.htm;location / { if ( !-e $request_filename) {rewrite ^(.*)$ /index.php/?s=$1 last;break;}} location ~ \.php(.*)${include fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name; fastcgi_paramPATH_INFO$fastcgi_path_info; fastcgi_paramPATH_TRANSLATED$document_root$fastcgi_path_info; } }
 location ~ \.php { fastcgi_pass 127.0.0.1:9000; fastcgi_indexindex.php; #先加载默认后解析赋值 includefastcgi_params; #正则解析路径 set $path_info ""; set $real_script_name $fastcgi_script_name; if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {set $real_script_name $1;set $path_info $2; } fastcgi_param PATH_INFO $path_info; fastcgi_param SCRIPT_FILENAME $document_root$real_script_name; fastcgi_param SCRIPT_NAME $real_script_name; }
回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}