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代码
  1. server {
  2.         listen       443;
  3.         server_name  www.abc123.com

  4.         ssl                  on;
  5.         ssl_certificate      ssl.pem;
  6.         ssl_certificate_key ssl.key;

  7.         ssl_session_timeout  5m;

  8.         ssl_protocols  SSLv2 SSLv3 TLSv1;
  9.         ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
  10.         ssl_prefer_server_ciphers   on;

  11.         location / {
  12.             root   /home/wwwroot;
  13.             index  index.html index.htm index.php;
  14.         }
  15.                 location ~ .*\.(php|php5)?$
  16.                 {
  17.                         fastcgi_pass  unix:/tmp/php-cgi.sock;
  18.                         fastcgi_index index.php;
  19.                         fastcgi_param  HTTPS on;
  20.                         include fcgi.conf;
  21.                 }
  22.                 access_log  off;
  23.     }
复制代码

作者: 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