左侧配置文件,修改如下代码:
#BINDING-c.birdteam.net-START
server
{
listen 80;
listen 443 ssl;
server_name c.birdteam.net;
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/birdteam.net/static;
ssl_certificate /etc/letsencrypt/live/birdteam.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/birdteam.net/privkey.pem;
if ($server_port !~ 443){
rewrite ^/.*$ https://$host$uri;
}
error_page 497 https://$host$uri;
error_page 404 /404.html;
error_page 502 /502.html;
include enable-php-54.conf;
include /www/server/panel/vhost/rewrite/birdteam.net.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$
{
expires 12h;
access_log off;
}
access_log /www/wwwlogs/birdteam.net.log;
}
#BINDING-c.birdteam.net-END
红色部分为需要添加的,其它位置根据自己需要修改! |