-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx_rtd.conf
executable file
·48 lines (39 loc) · 1.25 KB
/
nginx_rtd.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
46
47
48
upstream django {
# connect to this socket
# for a file socket ! do not use /tmp, as socket will only be seen by process that created it !
server unix:/var/run/uwsgi.sock;
}
server {
# the port your site will be served on
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
#listen 80;
# the domain name it will serve for
#server_name ${SERVER}; # substitute your machine's IP address or FQDN
charset utf-8;
#Max upload size
client_max_body_size 75M; # adjust to taste
# Django media
location /media {
alias /opt/readthedocs.org/media; # your Django project's media files
}
location /static {
alias /opt/readthedocs.org/media/static; # your Django project's static files
}
# Finally, send all non-media requests to the Django server.
location / {
uwsgi_pass django;
include /etc/nginx/uwsgi_params; # or the uwsgi_params you installed manually
}
location /public_web_root/ {
root /opt/readthedocs.org;
internal;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}