1 Star 0 Fork 15

龙人 / TPshop

forked from burningmyself / TPshop 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
nginx.conf3 1.51 KB
一键复制 编辑 原始数据 按行查看 历史
burningmyself 提交于 2017-01-05 18:14 . Default
server
{
listen 80;
#listen [::]:80;
server_name www.tp-shop.cn;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/www.tp-shop.cn;
location / {
index index.html index.htm index.php;
#autoindex on;
}
location ~ \.php(.*)$ {
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
# 需要开启 php.ini cgi.fix_pathinfo=1
location ~.*\.(jpg|png|jpeg)$
{
root /home/wwwroot/www.tp-shop.cn;
#expires 30d;
}
# js css缓存一小时
location ~.*\.(js|css)$ {
root /home/wwwroot/www.tp-shop.cn;
#expires 1h;
}
include other.conf;
#error_page 404 /404.html;
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
error_log /home/wwwlogs/www.tp-shop.cn.err;
access_log /home/wwwlogs/www.tp-shop.cn.log;
}
PHP
1
https://gitee.com/long_ren/TPshop.git
git@gitee.com:long_ren/TPshop.git
long_ren
TPshop
TPshop
master

搜索帮助