28 lines
586 B
Django/Jinja
28 lines
586 B
Django/Jinja
# The `upstream` directives ensure that you have a http/1.1 connection
|
|
# This enables the keepalive option and better performance
|
|
#
|
|
# Define the server IP and ports here.
|
|
upstream server {
|
|
server localhost:{{ host_port }};
|
|
}
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
server_name {{ http_host }};
|
|
|
|
# Allow large attachments
|
|
client_max_body_size 525M;
|
|
|
|
location / {
|
|
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;
|
|
|
|
proxy_pass http://server;
|
|
}
|
|
|
|
}
|
|
|