Add sample config files
This commit is contained in:
parent
a70aee6cf6
commit
34734864b4
|
@ -0,0 +1,38 @@
|
||||||
|
server {
|
||||||
|
server_name ftracker.fasttube.de;
|
||||||
|
|
||||||
|
listen 443 ssl;
|
||||||
|
|
||||||
|
root /root/ft-corona-tracker/web;
|
||||||
|
|
||||||
|
index index.html index.htm;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
# First attempt to serve request as file
|
||||||
|
# If no such file, show index to allow for client side routing
|
||||||
|
try_files $uri $uri/ @api;
|
||||||
|
}
|
||||||
|
|
||||||
|
location @api {
|
||||||
|
include uwsgi_params;
|
||||||
|
# Pass it to the uwsgi server
|
||||||
|
uwsgi_pass unix:///tmp/ftracker.sock;
|
||||||
|
}
|
||||||
|
|
||||||
|
# RIP
|
||||||
|
add_header X-Clacks-Overhead "GNU Terry Pratchett" always;
|
||||||
|
|
||||||
|
ssl_certificate /usr/local/etc/letsencrypt/live/ftracker.fasttube.de/fullchain.pem;
|
||||||
|
ssl_certificate_key /usr/local/etc/letsencrypt/live/ftracker.fasttube.de/privkey.pem;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
server_name ftracker.fasttube.de;
|
||||||
|
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
# 308 instead of 301 to prohibit method change on redirect
|
||||||
|
# (some clients change POST to GET on 301, 308 does not allow that)
|
||||||
|
return 308 https://$host$request_uri;
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# PROVIDE: ftracker
|
||||||
|
# REQUIRE: LOGIN DAEMON NETWORKING
|
||||||
|
# KEYWORD: fasttube corona tracker
|
||||||
|
|
||||||
|
# Enable this script by adding:
|
||||||
|
# ftracker_enable="YES"
|
||||||
|
# ... to /etc/rc.conf
|
||||||
|
|
||||||
|
. /etc/rc.subr
|
||||||
|
|
||||||
|
name="ftracker"
|
||||||
|
rcvar="ftracker_enable"
|
||||||
|
|
||||||
|
pidfile="/var/run/${name}.pid"
|
||||||
|
logfile="/var/log/${name}.log"
|
||||||
|
configfile="/root/ft-corona-tracker/res/ftracker.uwsgi.ini"
|
||||||
|
|
||||||
|
command="/usr/local/bin/uwsgi";
|
||||||
|
command_args="--ini ${configfile} --daemonize ${logfile} --pidfile ${pidfile}"
|
||||||
|
|
||||||
|
sig_stop="INT"
|
||||||
|
sig_reload="TERM"
|
||||||
|
|
||||||
|
load_rc_config $name
|
||||||
|
run_rc_command "$1"
|
|
@ -0,0 +1,11 @@
|
||||||
|
[uwsgi]
|
||||||
|
module = ftracker:app
|
||||||
|
socket = /tmp/ftracker.sock
|
||||||
|
manage-script-name = true
|
||||||
|
master = true
|
||||||
|
|
||||||
|
uid = www
|
||||||
|
gid = www
|
||||||
|
|
||||||
|
proesses = 1
|
||||||
|
threads = 1
|
Loading…
Reference in New Issue