Update uWSGI and Nginx config
This commit is contained in:
		
							parent
							
								
									4cf869c9fa
								
							
						
					
					
						commit
						5d2cff674d
					
				
					 2 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
upstream {{ site_name }}_django_wsgi {
 | 
					upstream {{ site_name }}_django_wsgi {
 | 
				
			||||||
    keepalive 2;  # Cache 2 connections.
 | 
					    keepalive 2;  # Cache 2 connections.
 | 
				
			||||||
    server unix:/run/{{ site_name }}/django_uwsgi.sock;
 | 
					    server unix:/run/symposion/{{ site_name }}_uwsgi.sock;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# server {
 | 
					# server {
 | 
				
			||||||
| 
						 | 
					@ -14,8 +14,8 @@ server {
 | 
				
			||||||
    server_name {{ env.domain }};
 | 
					    server_name {{ env.domain }};
 | 
				
			||||||
    client_max_body_size 50M;
 | 
					    client_max_body_size 50M;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ssl_certificate /etc/letsencrypt/live/{{ env.domain }}/fullchain.pem;
 | 
					    # ssl_certificate /etc/letsencrypt/live/{{ env.domain }}/fullchain.pem;
 | 
				
			||||||
    ssl_certificate_key /etc/letsencrypt/live/{{ env.domain }}/privkey.pem;
 | 
					    # ssl_certificate_key /etc/letsencrypt/live/{{ env.domain }}/privkey.pem;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Ask for HTTPS for 180 days.
 | 
					    # Ask for HTTPS for 180 days.
 | 
				
			||||||
    add_header Strict-Transport-Security "max-age=15552000; includeSubDomains";
 | 
					    add_header Strict-Transport-Security "max-age=15552000; includeSubDomains";
 | 
				
			||||||
| 
						 | 
					@ -24,7 +24,7 @@ server {
 | 
				
			||||||
    add_header X-Content-Type-Options nosniff;
 | 
					    add_header X-Content-Type-Options nosniff;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Advise browser to only load external content from these sites.
 | 
					    # 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 / {
 | 
					    location / {
 | 
				
			||||||
        # Django web application including static files (via WhiteNoise).
 | 
					        # Django web application including static files (via WhiteNoise).
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,9 +3,9 @@ strict = true  # Fail if unknown config parameter found.
 | 
				
			||||||
plugins = python3
 | 
					plugins = python3
 | 
				
			||||||
chdir = {{ project_dir }}
 | 
					chdir = {{ project_dir }}
 | 
				
			||||||
home = {{ virtualenv }}
 | 
					home = {{ virtualenv }}
 | 
				
			||||||
module = project.wsgi
 | 
					module = pinaxcon.wsgi
 | 
				
			||||||
master = true
 | 
					master = true
 | 
				
			||||||
socket = /run/{{ site_name }}/django_uwsgi.sock
 | 
					socket = /run/symposion/{{ site_name }}_uwsgi.sock
 | 
				
			||||||
processes = 3
 | 
					processes = 3
 | 
				
			||||||
# Reduced this again now that reports are deferred to a queued task. Could
 | 
					# Reduced this again now that reports are deferred to a queued task. Could
 | 
				
			||||||
# potentially be further reduced.
 | 
					# potentially be further reduced.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue