ansible/roles/workadventure/templates/vhost.j2

77 lines
1.7 KiB
Django/Jinja

server {
listen 80;
listen [::]:80;
server_name {{ workadventure_domain }} play.{{ workadventure_domain }} pusher.{{ workadventure_domain }} uploader.{{ workadventure_domain }};
location /.well-known/acme-challenge {
default_type "text/plain";
alias /var/www/acme-challenge;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ workadventure_domain }};
ssl_certificate_key /etc/nginx/ssl/{{ workadventure_domain }}.key;
ssl_certificate /etc/nginx/ssl/{{ workadventure_domain }}.crt;
location / {
root /opt/workadventure/source/landing/dist;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name play.{{ workadventure_domain }};
ssl_certificate_key /etc/nginx/ssl/{{ workadventure_domain }}.key;
ssl_certificate /etc/nginx/ssl/{{ workadventure_domain }}.crt;
location / {
root /opt/workadventure/source/front/dist;
try_files $uri uri/ /index.html?$args;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name pusher.{{ workadventure_domain }};
ssl_certificate_key /etc/nginx/ssl/{{ workadventure_domain }}.key;
ssl_certificate /etc/nginx/ssl/{{ workadventure_domain }}.crt;
location / {
proxy_pass http://localhost:8002;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name uploader.{{ workadventure_domain }};
ssl_certificate_key /etc/nginx/ssl/{{ workadventure_domain }}.key;
ssl_certificate /etc/nginx/ssl/{{ workadventure_domain }}.crt;
location / {
proxy_pass http://localhost:8005;
}
}