vim mimvp_proxy.conf
server {
listen 80;
server_name proxy.mimvp.com; # 域名可以有多个,用空格隔开
root www/mimvp_proxy;
rewrite ^(.*)$ https://$host$1 permanent;
location / {
root www/mimvp_proxy;
index index.php index.html index.htm;
}
location ~ \.php$ {
root www/mimvp_proxy;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi.conf;
}
location ~* ^/(images|img|javascript|js|css|blog|flash|media|static)/ {
root www/mimvp_proxy;
expires 30d;
}
location ~* ^/(robots\.txt) {
root www/mimvp_proxy;
expires 365d;
}
location ~* ^/favicon\.ico {
root www/mimvp_proxy;
expires 365d;
}
location ~* ^/img/logo\.png {
root www/mimvp_proxy;
expires 365d;
}
location ~ /\.ht {
deny all;
}
}
server {
listen 443 ssl http2;
server_name proxy.mimvp.com; # 域名可以有多个,用空格隔开
root www/mimvp_proxy;
ssl on;
ssl_certificate proxy.mimvp.com.crt;
ssl_certificate_key proxy.mimvp.com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
root www/mimvp_proxy;
index index.php index.html index.htm;
}
location ~ \.php$ {
root www/mimvp_proxy;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi.conf;
}
location ~* ^/(images|img|javascript|js|css|blog|flash|media|static)/ {
root www/mimvp_proxy;
expires 30d;
}
location ~* ^/(robots\.txt) {
root www/mimvp_proxy;
expires 365d;
}
location ~* ^/favicon\.ico {
root www/mimvp_proxy;
expires 365d;
}
location ~* ^/img/logo\.png {
root www/mimvp_proxy;
expires 365d;
}
location ~ /\.ht {
deny all;
}
}