2017-06-02 10:52:15 +00:00
|
|
|
#{{ ansible_managed }}
|
|
|
|
|
2018-06-02 12:27:25 +00:00
|
|
|
# Web archive and other special configurations
|
2017-06-02 10:52:15 +00:00
|
|
|
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name www-old.{{ domain }};
|
|
|
|
index index.html index.htm;
|
|
|
|
root {{ archive_dir }};
|
2018-06-02 12:37:25 +00:00
|
|
|
add_after_body /archive-message.html;
|
|
|
|
location = /archive-message.html {
|
|
|
|
root {{ release_dir }}/static/org/;
|
|
|
|
}
|
2017-06-02 10:52:15 +00:00
|
|
|
location / {
|
|
|
|
try_files $uri $uri/ =404;
|
|
|
|
}
|
2018-06-02 12:37:25 +00:00
|
|
|
# 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;
|
2018-06-02 12:27:25 +00:00
|
|
|
}
|
2017-06-02 10:52:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
2018-06-02 12:37:25 +00:00
|
|
|
# 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;
|
2017-06-02 10:52:15 +00:00
|
|
|
}
|