Config docker
This commit is contained in:
@@ -11,7 +11,7 @@ limit_req_zone $binary_remote_addr zone=forms:10m rate=2r/m;
|
||||
# ── HTTP → HTTPS redirect ──────────────────────────────────
|
||||
server {
|
||||
listen 80;
|
||||
server_name jool-int.com www.jool-int.com;
|
||||
server_name jool-international.com www.jool-international.com;
|
||||
|
||||
# Let's Encrypt challenge
|
||||
location /.well-known/acme-challenge/ {
|
||||
@@ -27,11 +27,11 @@ server {
|
||||
server {
|
||||
listen 443 ssl;
|
||||
http2 on;
|
||||
server_name jool-int.com www.jool-int.com;
|
||||
server_name jool-international.com www.jool-international.com;
|
||||
|
||||
# ── SSL ────────────────────────────────────────────────
|
||||
ssl_certificate /etc/letsencrypt/live/jool-int.com/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/jool-int.com/privkey.pem;
|
||||
ssl_certificate /etc/letsencrypt/live/jool-international.com/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/jool-international.com/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
|
||||
|
||||
37
nginx/nginx.local.conf
Normal file
37
nginx/nginx.local.conf
Normal file
@@ -0,0 +1,37 @@
|
||||
upstream django {
|
||||
server web:8000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost 127.0.0.1;
|
||||
|
||||
client_max_body_size 10M;
|
||||
|
||||
location /static/ {
|
||||
alias /app/staticfiles/;
|
||||
expires 30d;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location /media/careers/cvs/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location /media/ {
|
||||
alias /app/media/;
|
||||
expires 7d;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://django;
|
||||
proxy_set_header Host $host;
|
||||
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_redirect off;
|
||||
proxy_read_timeout 60s;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user