server {
listen 443;
server_name xxx.com;
index index.php;
root /www/ipadownload;
ssl on;
ssl_certificate /etc/nginx/conf.d/cert/server.pem;
ssl_certificate_key /etc/nginx/conf.d/cert/server.key;
ssl_session_timeout 5m;
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 ~* ^/(application|template|runtime)/.*\.(php|php5)$
{
deny all;
}
location / {
index index.htm index.html index.php;
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
}
location ~ /.*\.php/ {
rewrite ^(.*?/?)(.*\.php)(.*)$ /$2?s=$3 last;
break;
}
location ~ \.php/?.*$ {
root /www/ipadownload;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}