nginx配置ssl问题
看军哥的https://www.vpser.net/manage/namecheap-free-ssl-nginx.html这篇文章学习在nginx下设置ssl,按照军哥的教程配置的nginx.conf,但是现在用ssl访问貌似只能显示静态网页,一碰到动态php文件就提示No input file specified.
求解 :Q
我的nginx.conf代码
server {
listen 443;
server_namewww.abc123.com
ssl on;
ssl_certificate ssl.pem;
ssl_certificate_key ssl.key;
ssl_session_timeout5m;
ssl_protocolsSSLv2 SSLv3 TLSv1;
ssl_ciphersALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
location / {
root /home/wwwroot;
indexindex.html index.htm index.php;
}
location ~ .*\.(php|php5)?$
{
fastcgi_passunix:/tmp/php-cgi.sock;
fastcgi_index index.php;
fastcgi_paramHTTPS on;
include fcgi.conf;
}
access_logoff;
}
回复 1# 的帖子
首先确保root 所指向目录有该php文件。把root /home/wwwroot;
indexindex.html index.htm index.php;这上面的location / {去掉,下面的}也去掉。
/usr/local/nginx/sbin/nginx -t 看一下,再/usr/local/nginx/sbin/nginx -s reload
回复 2# 的帖子
军哥V5居然搞定了
页:
[1]