mirror of
https://github.com/jorisbertomeu/web-screensaver.git
synced 2026-04-19 16:27:40 +02:00
first
This commit is contained in:
29
nginx.conf
Normal file
29
nginx.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
events {}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
# Configuration du serveur
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
# Redirige toutes les requêtes vers le front
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Proxy pour l'API Node.js
|
||||
location /api {
|
||||
proxy_pass http://localhost:3000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
rewrite ^/api/(.*)$ /$1 break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user