PHP with SSL

HTF nginx-forum at nginx.us
Thu Jun 16 22:11:25 MSD 2011


Hello,

I followed the instruction from this link -
http://nginx.org/en/docs/http/configuring_https_servers.html
- but I can't solve some issue with PHP and SSL, basically web browser
says that site is partially encrypted however when I commented out the
location for the PHP/FastCGI everything works fine. I can access any
directory/file (for instance http://mydomain.com/randomfile) over SSL
but main website is not working. 
- Do I need to enable some extra configuration?

Please find my config below:

http {
...
## Global SSL options
  ssl_prefer_server_ciphers on;
  ssl_session_cache shared:SSL:10m;
  ssl_session_timeout 10m;
...
##
 server {
      add_header  Cache-Control "public, must-revalidate";
      expires     90d;
      index       index.php index.html index.php;
      listen      192.168.1.10:443;
      root        /home/web/mydomain.com;
      server_name mydomain.com;
## SSL Certs (specific to this URL)
      ssl on;
      ssl_certificate /home/mydomain.com/mydomain.com.chained.crt;
      ssl_certificate_key /home/mydomain.com/mydomain.com.key;
##
location ~ \.php$ {
            root           /home/web/mydomain.com;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME 
/home/web/mydomain.com$fastcgi_script_name;
            include        fastcgi_params;
    }
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,207667,207667#msg-207667




More information about the nginx mailing list