server
{
listen 443 ssl http2;
server_name sign.mgu.cc;
index index.html index.htm index.php;
root /home/wwwroot/sign.mgu.cc/Tieba-Cloud-Sign;
ssl on;
ssl_certificate /root/ssl/1__.mgu.cc_bundle.crt;
ssl_certificate_key /root/ssl/mgu.cc_key.txt;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:RC4-SHA:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!DSS:!PKS;
ssl_session_cache builtin:1000 shared:SSL:10m;

include other.conf;
error_page 403 404 502 503 =301 https://sign.mgu.cc/;

location ~ /(lib|plugins|source|templates)/.*\.(php|Php|PHp|PHP|phP|pHP|pHp|PhP)?$ {
deny all;
}

include enable-php.conf;

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}

location ~ .*\.(js|css)?$
{
expires 12h;
}

location ~ /\.
{
deny all;
}

access_log off;
}

标签: nginx, SSL, HTTPS

添加新评论