mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 00:35:50 +02:00
47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
upstream django_server_random7267.example.org {
|
|
server unix:/srv/http/random24334/live/website.sock;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen 443 ssl;
|
|
|
|
server_name random7267.example.org;
|
|
|
|
ssl_certificate /etc/ssl/public/random7267.example.org_chained.crt;
|
|
ssl_certificate_key /etc/ssl/private/random7267.example.org.key;
|
|
|
|
location /media/ {
|
|
alias /srv/http/random24334/live/dynamic/public/;
|
|
expires 7d;
|
|
include upload_folder_security_params;
|
|
}
|
|
location /static/ {
|
|
alias /srv/http/random24334/live/static_collected/;
|
|
expires 7d;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://django_server_random7267.example.org;
|
|
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-Protocol $scheme;
|
|
}
|
|
|
|
access_log /var/log/nginx/random24334/live/access.log combined_plus;
|
|
error_log /var/log/nginx/random24334/live/error.log;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen 443 ssl;
|
|
|
|
server_name www.random7267.example.org;
|
|
|
|
ssl_certificate /etc/ssl/public/random7267.example.org_chained.crt;
|
|
ssl_certificate_key /etc/ssl/private/random7267.example.org.key;
|
|
|
|
return 301 http://random7267.example.org$request_uri;
|
|
}
|