Files
projet-tlc/nginx.conf
2026-02-16 12:23:19 +01:00

49 lines
1.5 KiB
Nginx Configuration File

server {
listen 443 ssl;
server_name _;
ssl_certificate /etc/letsencrypt/live/tondomaine.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/tondomaine.com/privkey.pem;
root /usr/share/nginx/html;
index index.html;
##########################
# Proxy API requests to the back service
##########################
location /api/ {
proxy_pass http://back:8080/api/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "";
}
location /pad/ {
proxy_pass http://etherpad:9001/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "";
}
##########################
# FrontEnd returns
##########################
location / {
proxy_pass http://front:80/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "";
}
},
server {
listen 80;
server_name tondomaine.com;
return 301 https://$host$request_uri;
}