-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
45 lines (38 loc) · 1.1 KB
/
nginx.conf
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
37
38
39
40
41
42
43
44
45
# Main Nginx configuration file
events {
# Basic events configuration (usually default is sufficient)
worker_connections 1024;
}
http {
# Include mime types
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Logging options
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# Server block starts here
server {
listen 80;
# Server name
server_name localhost;
# Proxy pass to Django
location / {
#include proxy_params;
proxy_pass http://web:8000;
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_headers_hash_max_size 512;
proxy_headers_hash_bucket_size 128;
client_max_body_size 200M;
}
# Serve static files
location /static {
alias /app/static;
}
# Serve media files
location /media {
alias /app/media;
}
}
}