Setup nginx reverse proxy
This commit is contained in:
14
roles/proxy/templates/server-nginx.conf.j2
Normal file
14
roles/proxy/templates/server-nginx.conf.j2
Normal file
@@ -0,0 +1,14 @@
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name {{ item.domain }};
|
||||
access_log /var/log/nginx/{{ item.domain }}.log main;
|
||||
{% if not item.production %}
|
||||
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
|
||||
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
|
||||
{% endif %}
|
||||
location / {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_pass {{ item.proxy_pass }};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user