Is this better?
server {
listen 443 ssl;
listen 127.0.0.1:8001;
server_name www.example.org;
return 301 $scheme://example.org$request_uri;
}
server {
listen 127.0.0.1:8001;
server_name example.org;
root /home/user/public;
index index.php
gzip_static on;
access_log /var/log/nginx/example.org_access.log;
error_log /var/log/nginx/example.org_error.log;
include conf.d/drupal.frag;
}
server {
listen 443 ssl;
server_name example.org;
root /home/user/public;
index index.php
gzip_static on;
access_log /var/log/nginx/example.org_access.log;
ssl_certificate /etc/ssl/certs/example.org.pem;
ssl_certificate_key /etc/ssl/private/example.org.key;
ssl_ciphers HIGH:MEDIUM:!aNULL:!aDH:@STRENGTH;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
# require SSL for phpMyAdmin
include conf.d/phpmyadmin.frag;
include conf.d/drupal.frag;
}
server {
listen 443 ssl;
listen 127.0.0.1:8001;
server_name www.example.org;
return 301 $scheme://example.org$request_uri;
}
server {
listen 127.0.0.1:8001;
server_name example.org;
root /home/user/public;
index index.php
gzip_static on;
access_log /var/log/nginx/example.org_access.log;
error_log /var/log/nginx/example.org_error.log;
include conf.d/drupal.frag;
}
server {
listen 443 ssl;
server_name example.org;
root /home/user/public;
index index.php
gzip_static on;
access_log /var/log/nginx/example.org_access.log;
ssl_certificate /etc/ssl/certs/example.org.pem;
ssl_certificate_key /etc/ssl/private/example.org.key;
ssl_ciphers HIGH:MEDIUM:!aNULL:!aDH:@STRENGTH;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
# require SSL for phpMyAdmin
include conf.d/phpmyadmin.frag;
include conf.d/drupal.frag;
}