-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ db.sqlite3 | |
__pycache__/ | ||
old_app/ | ||
.env* | ||
/static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
server { | ||
server_name teams24.itacpc.it; | ||
|
||
location = /favicon.ico { access_log off; log_not_found off; } | ||
location /static/ { | ||
root /home/itacpc/teams; | ||
} | ||
|
||
location / { | ||
include proxy_params; | ||
proxy_pass http://unix:/run/gunicorn.sock; | ||
} | ||
|
||
listen 443 ssl; # managed by Certbot | ||
ssl_certificate /etc/letsencrypt/live/teams24.itacpc.it-0001/fullchain.pem; # managed by Certbot | ||
ssl_certificate_key /etc/letsencrypt/live/teams24.itacpc.it-0001/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 | ||
|
||
|
||
|
||
} | ||
server { | ||
if ($host = teams.itacpc.it) { | ||
return 301 https://itacpc.it/; | ||
} | ||
server_name teams.itacpc.it; | ||
|
||
listen 443 ssl; # managed by Certbot | ||
ssl_certificate /etc/letsencrypt/live/teams24.itacpc.it-0001/fullchain.pem; # managed by Certbot | ||
ssl_certificate_key /etc/letsencrypt/live/teams24.itacpc.it-0001/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 | ||
|
||
} | ||
|
||
server { | ||
if ($host = teams24.itacpc.it) { | ||
return 301 https://$host$request_uri; | ||
} # managed by Certbot | ||
|
||
|
||
listen 80; | ||
server_name teams24.itacpc.it; | ||
return 404; # managed by Certbot | ||
|
||
|
||
} | ||
|
||
server { | ||
if ($host = teams.itacpc.it) { | ||
return 301 https://$host$request_uri; | ||
} # managed by Certbot | ||
|
||
|
||
|
||
listen 80; | ||
server_name teams.itacpc.it; | ||
return 404; # managed by Certbot | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[Unit] | ||
Description=gunicorn daemon | ||
Requires=gunicorn.socket | ||
After=network.target | ||
|
||
[Service] | ||
User=itacpc | ||
Group=www-data | ||
WorkingDirectory=/home/itacpc/teams | ||
ExecStart=/home/itacpc/.local/share/virtualenvs/teams-_GRcvIg0/bin/gunicorn \ | ||
--access-logfile - \ | ||
--workers 3 \ | ||
--bind unix:/run/gunicorn.sock \ | ||
itacpc.wsgi:application | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Unit] | ||
Description=gunicorn socket | ||
|
||
[Socket] | ||
ListenStream=/run/gunicorn.sock | ||
|
||
[Install] | ||
WantedBy=sockets.target |