Document installation in production
This commit is contained in:
parent
fd9618790a
commit
c8e450f377
3 changed files with 133 additions and 1 deletions
49
docs/nginx_photos
Normal file
49
docs/nginx_photos
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name photos.crans.org;
|
||||
location / {
|
||||
return 302 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name photos.crans.org;
|
||||
|
||||
# Keep the TCP connection open a bit for faster browsing
|
||||
keepalive_timeout 70;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/photos.crans.org/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/photos.crans.org/privkey.pem;
|
||||
ssl_session_timeout 1d;
|
||||
ssl_session_cache shared:MozSSL:10m;
|
||||
ssl_session_tickets off;
|
||||
ssl_dhparam /etc/letsencrypt/dhparam;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
||||
ssl_prefer_server_ciphers off;
|
||||
|
||||
# Enable OCSP Stapling, point to certificate chain
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
ssl_trusted_certificate /etc/letsencrypt/live/photos.crans.org/chain.pem;
|
||||
|
||||
error_log /var/log/nginx/photos.crans.org_error.log;
|
||||
access_log /var/log/nginx/photos.crans.org_access.log;
|
||||
|
||||
# Django statics and media
|
||||
location /media {
|
||||
alias /var/www/photos/photo21/media;
|
||||
}
|
||||
location /static {
|
||||
alias /var/www/photos/photo21/static;
|
||||
}
|
||||
|
||||
location / {
|
||||
uwsgi_pass unix:///var/www/photos/photos21/photos21.sock;
|
||||
include /etc/nginx/uwsgi_params;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue