template for ngnix reverse proxy + rocketchat task updates converted from assetto role
This commit is contained in:
35
templates/nginx.conf.j2
Executable file
35
templates/nginx.conf.j2
Executable file
@@ -0,0 +1,35 @@
|
||||
# Upstreams
|
||||
upstream backend {
|
||||
server 127.0.0.1:3000;
|
||||
}
|
||||
|
||||
# HTTPS Server
|
||||
server {
|
||||
listen 443;
|
||||
server_name {{ rocketchat_hostname }};
|
||||
|
||||
# You can increase the limit if your need to.
|
||||
client_max_body_size 200M;
|
||||
|
||||
error_log /var/log/nginx/rocketchat.access.log;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate /etc/nginx/rocketchat.crt;
|
||||
ssl_certificate_key /etc/nginx/rocketchat.key;
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # don’t use SSLv3 ref: POODLE
|
||||
|
||||
location / {
|
||||
proxy_pass http://backend;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_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 https;
|
||||
proxy_set_header X-Nginx-Proxy true;
|
||||
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user