I successfully created some LE SSL certs, using this guide.
However, when I updated my nginx config to use the certs and redirect all port 80 traffic to 443. http successfully redirects to https, the site doesn't load. The browser detects that I have a valid cert, but says I do not have a secure connection. This is what I have in my /var/log/nginx/error.log
:
2016/03/08 00:11:49 [error] 7301#0: *14 no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking, client: 55.555.55.555, server: 0.0.0.0:443
The error says I have no SSL cert defined, despite the fact that I do. This is my config:
server {
listen 443 ssl;
server_name cooldomain.pizza www.cooldomain.pizza
ssl_certificate /etc/letsencrypt/live/cooldomain.pizza/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/cooldomain.pizza/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
root /home/ubuntu/www/cooldomain-pizza;
index index.php index.html index.htm;
server_name cooldomain.pizza www.cooldomain.pizza;
charset utf-8;
location / {
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
location ~ \.php$ {
try_files $uri $uri/ =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
I'm running Ubuntu 14.04 with Nginx 1.4.6.
Any idea what is happening? I had to roll back the SSL version of the site and go back to being port-80-only.
nginx -t
to check for errors. – Michael Hampton Mar 8 '16 at 1:19