Init repo
This commit is contained in:
47
default_configuration/pywallter/nginx.conf.sample
Normal file
47
default_configuration/pywallter/nginx.conf.sample
Normal file
@@ -0,0 +1,47 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name __pywallter_domain__;
|
||||
|
||||
#Ajout pour les certificats letsencrypt
|
||||
include snippets/acme-challenge.conf;
|
||||
|
||||
return 301 https://$http_host$request_uri;
|
||||
|
||||
root /html/;
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name __pywallter_domain__;
|
||||
|
||||
|
||||
ssl_certificate /etc/ssl/__pywallter_domain__.crt;
|
||||
ssl_certificate_key /etc/ssl/private/__pywallter_domain__.key;
|
||||
|
||||
#Ajout d'une configuration ssl securise
|
||||
include snippets/secure-ssl.conf;
|
||||
|
||||
# Speeds things up a little bit when resuming a session
|
||||
# ssl_session_timeout 5m;
|
||||
# ssl_session_cache shared:SSL:5m;
|
||||
|
||||
# Ajout pour le certificat letsencrypt
|
||||
include snippets/acme-challenge.conf;
|
||||
|
||||
# Ajout pour securiser les headers
|
||||
include snippets/secure-headers.conf;
|
||||
client_max_body_size 100M;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Prefix /;
|
||||
}
|
||||
|
||||
# Path to the root of your installation
|
||||
root /html/;
|
||||
|
||||
}
|
||||
16
default_configuration/pywallter/pywallter.rc
Executable file
16
default_configuration/pywallter/pywallter.rc
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/ksh
|
||||
|
||||
daemon="/usr/local/bin/python3"
|
||||
daemon_flags="wsgi.py"
|
||||
daemon_user="pywallter"
|
||||
location="/home/pywallter/pywallter"
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
rc_start() {
|
||||
${rcexec} "cd ${location}; ${daemon} ${daemon_flags}"
|
||||
}
|
||||
|
||||
rc_bg=YES
|
||||
rc_cmd $1
|
||||
|
||||
Reference in New Issue
Block a user