VPS侦探论坛
标题:
nginx配置ssl问题
[打印本页]
作者:
安之
时间:
2011-1-26 15:22
标题:
nginx配置ssl问题
看军哥的
https://www.vpser.net/manage/namecheap-free-ssl-nginx.html
这篇文章学习在nginx下设置ssl,按照军哥的教程配置的nginx.conf,
但是现在用ssl访问貌似只能显示静态网页,一碰到动态php文件就提示No input file specified.
求解
我的nginx.conf代码
server {
listen 443;
server_name www.abc123.com
ssl on;
ssl_certificate ssl.pem;
ssl_certificate_key ssl.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
location / {
root /home/wwwroot;
index index.html index.htm index.php;
}
location ~ .*\.(php|php5)?$
{
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
fastcgi_param HTTPS on;
include fcgi.conf;
}
access_log off;
}
复制代码
作者:
licess
时间:
2011-1-26 15:57
标题:
回复 1# 的帖子
首先确保root 所指向目录有该php文件。
把root /home/wwwroot;
index index.html index.htm index.php;这上面的location / { 去掉,下面的}也去掉。
/usr/local/nginx/sbin/nginx -t 看一下,再/usr/local/nginx/sbin/nginx -s reload
作者:
安之
时间:
2011-1-26 17:44
标题:
回复 2# 的帖子
军哥V5 居然搞定了
欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/)
Powered by Discuz! X3.4