#{{ ansible_managed }} # Web archive and other special configurations server { listen 80; server_name www-old.{{ domain }}; index index.html index.htm; root {{ archive_dir }}; add_after_body /archive-message.html; location = /archive-message.html { root {{ release_dir }}/static/org/; } location / { try_files $uri $uri/ =404; } # Enable secure site support listen [::]:443; listen 443 ssl; ssl on; ssl_certificate /etc/letsencrypt/live/{{ domain }}/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/{{ domain }}/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; if ($scheme != "https") { return 301 https://$host$request_uri; } } server { listen 80; server_name conference.{{ domain }}; location /fr { return 301 $scheme://sph17.organizers-congress.org/frontend/index.php?sub=89; } location / { return 301 $scheme://sph17.organizers-congress.org; } # Enable secure site support listen [::]:443; listen 443 ssl; ssl on; ssl_certificate /etc/letsencrypt/live/{{ domain }}/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/{{ domain }}/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; }