Problem
I'm trying to mimic my production environment on my dev server.
(Setup: LEMP server, Ubuntu Server LTS 12.04)
On my production site I use an SSL certificate from Gandi, it all works fine.
On my dev environment I created one myself following the instructions here:
I'm using the Secure Pages module to secure the admin area however when I enable HTTPS for a role (Administrator) I get a re-direct loop for all my pages which locks me out of my site.
HTTPS does however work fine for single pages.
Any ideas what I could be doing wrong? Could this be a config thing?
Instructions I used to generate an SSL
sudo openssl genrsa -des3 -out server.key 1024
sudo openssl req -new -key server.key -out server.csr
// Leave all options blank, except put 192.168.1.95 address into common
sudo cp server.key server.key.org
sudo openssl rsa -in server.key.org -out server.key
sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Possible Relevant Nginx Config
/etc/nginx/sites-available/mysite
server {
listen 443;
root /srv/www/mysite/public
...
...
ssl on;
ssl_certificate /etc/nginx/ssl/testssl.crt;
ssl_certificate_key /etc/nginx/ssl/testssl.key;
location / {
index index.html index.htm index.php;
error_page 404 = @drupal;
}
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
if ($uri !~ "^/default/files/") {
fastcgi_pass 127.0.0.1:9000;
}
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/www/mysite/public$fastcgi_script_name;
}
location @drupal {
rewrite ^(.*)$ /index.php?q=$1 last;
}