server
{
listen 80;
#listen [::]:80;
server_name www.jianjia.com ;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/default/jianjia/public/;
include rewrite/thinkphp.conf; # 引入了thinkPHP的路由重写配置
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
include enable-php-pathinfo.conf; # 开启了路由模式,php.ini文件中的配置cgi.fix_pathinfo=1已经更改
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
access_log /home/wwwlogs/www.jianjia.com.log; 最佳答案