forked from tildeverse/ttm.sh
add nginx conf and systemd unit
This commit is contained in:
parent
2b7d0e5b20
commit
a3b917ee73
|
@ -0,0 +1,18 @@
|
||||||
|
# /etc/systemd/system/nullpointer.service
|
||||||
|
[Unit]
|
||||||
|
Description=null pointer
|
||||||
|
After=0x0.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=/home/services/0x0
|
||||||
|
ExecStart=/usr/local/bin/uwsgi --socket 127.0.0.1:3031 --wsgi-file fhost.py --callable app --processes 4 --threads 2
|
||||||
|
User=services
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5
|
||||||
|
StartLimitInterval=60s
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
server_name ttm.sh;
|
||||||
|
return 307 https://$server_name$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
listen [::]:443 ssl;
|
||||||
|
server_name ttm.sh;
|
||||||
|
|
||||||
|
# include your certs
|
||||||
|
ssl_certificate /etc/letsencrypt/live/ttm.sh/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/ttm.sh/privkey.pem;
|
||||||
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||||
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||||
|
|
||||||
|
root /home/services/0x0;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
include uwsgi_params;
|
||||||
|
uwsgi_param UWSGI_SCHEME $scheme;
|
||||||
|
|
||||||
|
# make sure this matches the port you're running uwsgi on
|
||||||
|
uwsgi_pass 127.0.0.1:3031;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /up {
|
||||||
|
internal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue