-
Notifications
You must be signed in to change notification settings - Fork 0
/
lexie.nginx
36 lines (29 loc) · 1.19 KB
/
lexie.nginx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Define the parameters for a specific virtual host/server
server {
# Define the directory where the contents being requested are stored
# root /usr/src/app/project/;
# Define the default page that will be served If no page was requested
# (ie. if www.kennedyfamilyrecipes.com is requested)
# index index.html;
# Define the server name, IP address, and/or port of the server
listen 80;
# server_name xxx.yyy.zzz.aaa
# Define the specified charset to the “Content-Type” response header field
charset utf-8;
# Configure NGINX to deliver static content from the specified folder
location /static {
alias /opt/lexie/static;
}
# Configure NGINX to reverse proxy HTTP requests to the upstream server (Gunicorn (WSGI server))
location / {
# Define the location of the proxy server to send the request to
include proxy_params;
proxy_pass http://unix:/opt/lexie/app.sock;
# Redefine the header fields that NGINX sends to the upstream server
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# Define the maximum file size on file uploads
client_max_body_size 5M;
}
}