Changeset - 5d2cff674dd4
[Not reviewed]
0 2 0
Ben Sturmfels (bsturmfels) - 12 months ago 2023-04-15 04:55:29
ben@sturm.com.au
Update uWSGI and Nginx config
2 files changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
deploy/nginx.conf
Show inline comments
 
upstream {{ site_name }}_django_wsgi {
 
    keepalive 2;  # Cache 2 connections.
 
    server unix:/run/{{ site_name }}/django_uwsgi.sock;
 
    server unix:/run/symposion/{{ site_name }}_uwsgi.sock;
 
}
 

	
 
# server {
...
 
@@ -14,8 +14,8 @@ server {
 
    server_name {{ env.domain }};
 
    client_max_body_size 50M;
 

	
 
    ssl_certificate /etc/letsencrypt/live/{{ env.domain }}/fullchain.pem;
 
    ssl_certificate_key /etc/letsencrypt/live/{{ env.domain }}/privkey.pem;
 
    # ssl_certificate /etc/letsencrypt/live/{{ env.domain }}/fullchain.pem;
 
    # ssl_certificate_key /etc/letsencrypt/live/{{ env.domain }}/privkey.pem;
 

	
 
    # Ask for HTTPS for 180 days.
 
    add_header Strict-Transport-Security "max-age=15552000; includeSubDomains";
...
 
@@ -24,7 +24,7 @@ server {
 
    add_header X-Content-Type-Options nosniff;
 

	
 
    # Advise browser to only load external content from these sites.
 
    add_header Content-Security-Policy "script-src 'self' 'unsafe-inline' 'unsafe-eval'";
 
    add_header Content-Security-Policy "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://code.jquery.com/jquery-3.5.1.min.js https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js https://js.stripe.com/v3/ https://r.stripe.com/0";
 

	
 
    location / {
 
        # Django web application including static files (via WhiteNoise).
deploy/uwsgi.ini
Show inline comments
...
 
@@ -3,9 +3,9 @@ strict = true  # Fail if unknown config parameter found.
 
plugins = python3
 
chdir = {{ project_dir }}
 
home = {{ virtualenv }}
 
module = project.wsgi
 
module = pinaxcon.wsgi
 
master = true
 
socket = /run/{{ site_name }}/django_uwsgi.sock
 
socket = /run/symposion/{{ site_name }}_uwsgi.sock
 
processes = 3
 
# Reduced this again now that reports are deferred to a queued task. Could
 
# potentially be further reduced.
0 comments (0 inline, 0 general)