I have Ubuntu 12.04 / nGinx running. Installed the SSL and all was working fine.
Now I want to force www to always be part of the URL so I currently have as the sites-available config:
#force public http to
http://wwwserver {
listen 80;
server_name example.com;
rewrite ^(.*)
http://www.example.com$1 permanent;
}
server {
listen 80;
server_name
http://www.example.com; [......]
}
#force secure https to
https://www server {
listen 443 ssl;
server_name example.com;
rewrite ^(.*)
https://www.example.com$1 permanent;
}
server {
listen 443 ssl;
server_name
https://www.example.com; ssl_certificate /srv/ssl/www.example.com.crt;
ssl_certificate_key /srv/ssl/www.example.com.key;
[......]
}
But now all i get is "The connection was interrupted page".
Error logs show nothing, nginx restart produces no errors or warnings.
The SSL used www in the name during the key / crt generation.
Any ideas? Suggestions would be great.
As always thanks!
Dave