1 Star 0 Fork 0

aij/thyg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
nginx.conf 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
jia 提交于 2018-03-10 14:16 . 初始化
server
{
listen 80;
#listen [::]:80;
server_name demo.tpshop3.com localhost;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/TPshop_v1.0;
#include phpcms.conf;
#error_page 404 /404.html;
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
location ~ .php($|/) {
set $script $uri;
set $path_info "";
if ($uri ~ "^(.+.php)(/.+)") {
set $script $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$script;
fastcgi_param SCRIPT_NAME $script;
fastcgi_param PATH_INFO $path_info;
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
#error_page 404 = /404.php;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
#access_log off;
access_log /home/wwwlogs/tpshop.com.log access;
error_page 404 /404.php;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/vpnchaoji/thyg.git
git@gitee.com:vpnchaoji/thyg.git
vpnchaoji
thyg
thyg
master

搜索帮助