Added templates nginx folder

This commit is contained in:
Guillem Hernandez Sola
2025-06-19 09:37:18 +02:00
parent c6bfc06c6c
commit 4a356854b7

View File

@@ -0,0 +1,33 @@
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
upstream backend {
server 192.168.11.40:80; # IP del servidor backend
}
server {
listen 80;
server_name {{ ansible_hostname }};
location / {
proxy_pass http://backend;
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;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
internal;
}
}
}