CentOS system, based on Nginx server, with HTTPS access to PHP page total popup download page problem perfect solution
Under Ningx, with http://ip/index.php can access PHP files, and https://ip/index.php always pop up the download dialog box, the problem is that there is no code block parsing php in HTTPS server{}
server {
Listen 443 SSL;
server_name localhost;
SSL on;
SSL_CERTIFICATE/USR/LOCAL/NGINX-1.5.1/CONF/SERVER.CRT;
Ssl_certificate_key/usr/local/nginx-1.5.1/conf/server.key;
Ssl_session_cache shared:ssl:1m;
Ssl_session_timeout 5m;
Ssl_ciphers high:!anull:! MD5;
Ssl_prefer_server_ciphers on;
Location/{
root/usr/local/nginx-1.5.1/html;
Index index.html index.htm hello.php index.php;
}
Location ~. *\. (PHP|PHP5)? $ {
root/usr/local/nginx-1.5.1/html/;
Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Fastcgi_param HTTPS on;
Fastcgi_param script_filename $document _root$fastcgi_script_name;
Include Fastcgi_params;
#new Line
Include fastcgi.conf;
}
}
The red part is used to parse PHP, when you enter https://ip/index.php will appear index.php page
httpsphp into HTTPS