upstream app_server { server 127.0.0.1:12000 fail_timeout=0; } server { listen 80; server_name dpaste.de dpaste.org; # Do not redirect to SSL for API calls (some clients dont support # this automatically) location /api { include /srv/dpaste.de/src/dpaste/server/nginx_server_appforward.conf; } location / { rewrite ^ https://$server_name$request_uri? permanent; } } server { listen 443; server_name dpaste.de; ssl on; ssl_certificate /srv/dpaste.de/var/ssl/dpaste_de_unified.crt; ssl_certificate_key /srv/dpaste.de/var/ssl/dpaste_de.key; include /srv/dpaste.de/src/dpaste/server/nginx_server.conf; } server { listen 443; server_name dpaste.org; ssl on; ssl_certificate /srv/dpaste.de/var/ssl/dpaste_org_unified.crt; ssl_certificate_key /srv/dpaste.de/var/ssl/dpaste_org.key; include /srv/dpaste.de/src/dpaste/server/nginx_server.conf; }