Added templates nginx folder
This commit is contained in:
33
training/practica-3-jinja2/nginx/templates/nginx.conf.j2
Normal file
33
training/practica-3-jinja2/nginx/templates/nginx.conf.j2
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user