mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 10:20:16 +01:00
42 lines
969 B
Nginx Configuration File
42 lines
969 B
Nginx Configuration File
# nginx/nginx.conf
|
|
|
|
events {
|
|
}
|
|
|
|
http {
|
|
upstream front {
|
|
server front:3000;
|
|
}
|
|
server {
|
|
# Redirect HTTP requests to HTTPS.
|
|
listen 80;
|
|
server_name localhost;
|
|
root /srv/public;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
|
|
server_name localhost;
|
|
root /srv/public;
|
|
server_tokens off;
|
|
|
|
ssl_certificate /etc/nginx/ssl/cert.pem;
|
|
ssl_certificate_key /etc/nginx/ssl/privkey.pem;
|
|
|
|
location / {
|
|
try_files $uri $uri/ @front;
|
|
}
|
|
|
|
location @front {
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header X-Forwarded-Ssl on;
|
|
proxy_set_header Host $http_host;
|
|
proxy_redirect off;
|
|
proxy_pass http://front;
|
|
proxy_cookie_path / "/; HTTPOnly; Secure";
|
|
}
|
|
}
|
|
} |