Portal Home > Knowledgebase > Articles Database > Nginx with PHP over SSL issue
Nginx with PHP over SSL issue
Posted by darkspace_co, 06-17-2011, 02:27 AM |
Hello,
I followed the instruction from this link - http://nginx.org/en/docs/http/config...s_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've noticed that when I assess admin side of my website (https://mydomain.com/admin) the site is encrypted but the main one (https://mydomain.com) is not.
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 by amaziah, 06-17-2011, 06:28 AM |
Try changing the following
fastcgi_param SCRIPT_FILENAME /home/web/mydomain.com$fastcgi_script_name;
to
fastcgi_param SCRIPT_FILENAME /home/mydomain.com$fastcgi_script_name;
This should be fixed.
|
Posted by ptimo3, 06-17-2011, 07:32 PM |
Try adding
fastcgi_param HTTPS on;
to the fastcgi parameters . :-)
|
Add to Favourites Print this Article
Also Read