49 lines
1.3 KiB
Plaintext
49 lines
1.3 KiB
Plaintext
server {
|
|
listen 80 default_server;
|
|
client_max_body_size 1M;
|
|
|
|
access_log off;
|
|
error_log off;
|
|
root /var/lib/nginx/html;
|
|
|
|
# display real ip in nginx logs when connected through reverse proxy via docker network
|
|
set_real_ip_from 172.0.0.0/8;
|
|
real_ip_header X-Forwarded-For;
|
|
|
|
location = /favicon.ico {
|
|
alias /var/www/app/datne/staticfiles/favicon.ico;
|
|
}
|
|
|
|
location / {
|
|
include /etc/nginx/proxy_params;
|
|
proxy_pass http://default_web_app:8000/;
|
|
}
|
|
}
|
|
server {
|
|
listen 443 ssl http2 default_server;
|
|
client_max_body_size 1M;
|
|
|
|
access_log off;
|
|
error_log off;
|
|
root /var/lib/nginx/html;
|
|
|
|
# display real ip in nginx logs when connected through reverse proxy via docker network
|
|
set_real_ip_from 172.0.0.0/8;
|
|
real_ip_header X-Forwarded-For;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/karls.lv/fullchain.pem; # managed by Certbot
|
|
ssl_certificate_key /etc/letsencrypt/live/karls.lv/privkey.pem; # managed by Certbot
|
|
include /etc/nginx/ssl.conf; # managed by Certbot
|
|
ssl_dhparam /etc/nginx/ssl-dhparams.pem; # managed by Certbot
|
|
|
|
location = /favicon.ico {
|
|
alias /var/www/app/datne/staticfiles/favicon.ico;
|
|
}
|
|
|
|
location / {
|
|
include /etc/nginx/proxy_params;
|
|
proxy_pass http://default_web_app:8000/;
|
|
}
|
|
}
|
|
|