deployment files, uwsgi + nginx
parent
d8b226929d
commit
36a0d29ff3
@ -0,0 +1,18 @@
|
||||
# uwsgi.ini file
|
||||
[uwsgi]
|
||||
|
||||
plugin=python3
|
||||
chdir = /data/www/xpub.nl/wsgi/call2025
|
||||
home = /data/www/xpub.nl/wsgi/call2025/venv
|
||||
|
||||
master = true
|
||||
processes = 10
|
||||
uwsgi-socket = /data/www/xpub.nl/wsgi/call2025/sock/django.sock
|
||||
chmod-socket = 666
|
||||
vacuum = true
|
||||
|
||||
#uid = media
|
||||
#gid = media
|
||||
|
||||
mount = /2025/call=call2025.wsgi:application
|
||||
manage-script-name=true
|
@ -0,0 +1,57 @@
|
||||
### WWW.XPUB.NL
|
||||
|
||||
upstream call {
|
||||
server unix:/data/www/xpub.nl/wsgi/call2025/sock/django.sock;
|
||||
}
|
||||
|
||||
server {
|
||||
server_name xpub.nl www.xpub.nl;
|
||||
root /data/www/xpub.nl/www.xpub.nl;
|
||||
index index.html index.htm;
|
||||
|
||||
# forbid serving any . files and directories (like .git)
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
return 404;
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
autoindex on;
|
||||
}
|
||||
|
||||
listen 443 ssl; # managed by Certbot
|
||||
ssl_certificate /etc/letsencrypt/live/xpub.nl/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/xpub.nl/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
|
||||
location /2025/call/ {
|
||||
uwsgi_pass call;
|
||||
include uwsgi_params;
|
||||
}
|
||||
location /2025/call/static/ {
|
||||
alias /data/www/xpub.nl/www.xpub.nl/2025/call/static/;
|
||||
}
|
||||
location /2025/call/media/ {
|
||||
alias /data/www/xpub.nl/www.xpub.nl/2025/call/media/;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
if ($host = www.xpub.nl) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
if ($host = xpub.nl) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
listen 80;
|
||||
server_name xpub.nl www.xpub.nl;
|
||||
return 404; # managed by Certbot
|
||||
}
|
Loading…
Reference in New Issue