-
Notifications
You must be signed in to change notification settings - Fork 0
/
weather.nginx.prod.conf
45 lines (33 loc) · 1.5 KB
/
weather.nginx.prod.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
upstream django_weaher_bot {
server 127.0.0.1:8003; # for a web port socket (we'll use this first)
}
# configuration of the server
server {
listen 80 default_server;
server_name weather.artbelka.by;
# the domain name it will serve for
# server_name *; # substitute your machine's IP address or FQDN
charset utf-8;
# max upload size
client_max_body_size 75M; # adjust to taste
access_log /var/log/nginx/web.access.log;
error_log /var/log/nginx/web.error.log;
# include acme;
# Django media
location /media {
alias /home/webrunner/projects/artbelka_weather_bot/src/artbelka_weather_bot/media; # your Django project's media files - amend as required
}
location /static {
alias /home/webrunner/projects/artbelka_weather_bot/src/artbelka_weather_bot/static; # your Django project's static files - amend as required
}
# Finally, send all non-media requests to the Django server.
location / {
uwsgi_pass django_weaher_bot;
include /home/webrunner/projects/artbelka_weather_bot/src/artbelka_weather_bot/uwsgi_params;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/weather.artbelka.by/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/weather.artbelka.by/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}