server {
server_name gehaowu.com www.gehaowu.com;
include includes/listen_full.template;
include includes/header_add.template;
include includes/headers_set_more.template;
include sites/rewrite.gehaowu.com.template;
ssl_certificate keys/www.gehaowu.com.crt;
ssl_certificate_key keys/www.gehaowu.com.key;
ssl_trusted_certificate keys/startcom_ssl_trusted_certificate.crt;
ssl_dhparam keys/dhparam.pem;
ssl_ecdh_curve secp384r1;
include includes/ssl.template;
include includes/ssl_stapling.template;
set $rewriterule https;
if ($scheme = https) {
set $rewriterule "${rewriterule}1";
}
if ($host ~* ^www.) {
set $rewriterule "${rewriterule}2";
}
if ($rewriterule != "https12") {
return 301 https://www.gehaowu.com$request_uri;
}
include includes/block_files.template;
include includes/expires.template;
index index.html index.htm;
root /usr/home/wwwroot/www.gehaowu.com;
error_page 404 /404.html;
error_page 403 /403.html;
error_page 500 502 503 504 /50x.html;
access_log /usr/home/wwwroot/logs/gehaowu.com.access.log;
error_log /usr/home/wwwroot/logs/gehaowu.com.error.log;
}