0

新的pathinfo tp5配置文件

2018-12-06 0:39209 人围观

简介 :server { listen 443; server_name www.xxx.cn; index index.php default.html defaul......

server
{
listen 443;
server_name www.xxx.cn;
index index.php default.html default.htm default.php;
root /home/wwwroot/www.xxx.cn;
ssl on;
ssl_certificate vhost/cert/www.xxx.cn.crt;
ssl_certificate_key vhost/cert/www.xxx.cn.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
#PHP-INFO-START PHP引用配置,可以注释或修改
location ~ [^/]\.php(/|$)
{
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
include pathinfo.conf;
}
#PHP-INFO-END

#REWRITE-START URL重写规则引用,修改后将导致面板设置的伪静态规则失效
include thinkphp.conf;
#REWRITE-END

#error_page 404 /404.html;

# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

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.xxx.cn.log;
}

版权声明

本文仅代表作者观点,不代表运营笔记立场。
本文系作者授权运营笔记发表,未经许可,不得转载。

发表评论

电子邮件地址不会被公开。