From f47a2ae0c4e12e19624e02baed502b56889973e1 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Sat, 22 Dec 2018 13:07:30 -0500 Subject: [PATCH] Add wsgi templates --- .../alternc/templates/apache2/wsgi-both.conf | 55 +++++++++++++++++++ .../alternc/templates/apache2/wsgi-http.conf | 42 ++++++++++++++ .../alternc/templates/apache2/wsgi-https.conf | 43 +++++++++++++++ 3 files changed, 140 insertions(+) create mode 100644 src/etc/alternc/templates/apache2/wsgi-both.conf create mode 100644 src/etc/alternc/templates/apache2/wsgi-http.conf create mode 100644 src/etc/alternc/templates/apache2/wsgi-https.conf diff --git a/src/etc/alternc/templates/apache2/wsgi-both.conf b/src/etc/alternc/templates/apache2/wsgi-both.conf new file mode 100644 index 0000000..4bf829d --- /dev/null +++ b/src/etc/alternc/templates/apache2/wsgi-both.conf @@ -0,0 +1,55 @@ + + ServerName %%fqdn%% + DocumentRoot %%document_root%% + AssignUserId #%%UID%% #%%GID%% + SetEnv LOGIN "%%UID%%-%%LOGIN%%" + + SSLEngine On + SSLCertificateFile %%CRT%% + SSLCertificateKeyFile %%KEY%% + %%CHAINLINE%% + + + WSGIDaemonProcess %%fqdn%% python-home=%%VENV%% python-path=%%document_root%%/%%APP_SUBDIR%%/ socket-user=#%%UID%% + WSGIProcessGroup %%fqdn%% + WSGIScriptAlias / %%document_root%%/%%APP_SUBDIR%%/wsgi.py process-group=%%fqdn%% + + + + AllowOverride All + + + Order allow,deny + Allow from all + + = 2.4> + Require all granted + + + + + + + ServerName %%fqdn%% + AssignUserId #%%UID%% #%%GID%% + SetEnv LOGIN "%%UID%%-%%LOGIN%%" + + + WSGIDaemonProcess %%fqdn%% python-home=%%VENV%% python-path=%%document_root%%/%%APP_SUBDIR%%/ socket-user=#%%UID%% + WSGIProcessGroup %%fqdn%% + WSGIScriptAlias / %%document_root%%/%%APP_SUBDIR%%/wsgi.py process-group=%%fqdn%% + + + + AllowOverride All + + + Order allow,deny + Allow from all + + = 2.4> + Require all granted + + + + diff --git a/src/etc/alternc/templates/apache2/wsgi-http.conf b/src/etc/alternc/templates/apache2/wsgi-http.conf new file mode 100644 index 0000000..35dff3a --- /dev/null +++ b/src/etc/alternc/templates/apache2/wsgi-http.conf @@ -0,0 +1,42 @@ + + ServerName %%fqdn%% + AssignUserId #%%UID%% #%%GID%% + SetEnv LOGIN "%%UID%%-%%LOGIN%%" + + SSLEngine On + SSLCertificateFile %%CRT%% + SSLCertificateKeyFile %%KEY%% + %%CHAINLINE%% + + KeepAlive Off + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !/cgi-bin/ + RewriteCond %{REQUEST_FILENAME} !/.well-known/acme-challenge/ + RewriteRule ^/(.*)$ http://%%fqdn%%/$1 [R=301,L] + + + + ServerName %%fqdn%% + DocumentRoot %%document_root%% + AssignUserId #%%UID%% #%%GID%% + SetEnv LOGIN "%%UID%%-%%LOGIN%%" + + WSGIDaemonProcess %%fqdn%% python-home=%%VENV%% python-path=%%document_root%%/%%APP_SUBDIR%%/ socket-user=#%%UID%% + WSGIProcessGroup %%fqdn%% + WSGIScriptAlias / %%document_root%%/%%APP_SUBDIR%%/wsgi.py process-group=%%fqdn%% + + + + AllowOverride All + + + Order allow,deny + Allow from all + + = 2.4> + Require all granted + + + + diff --git a/src/etc/alternc/templates/apache2/wsgi-https.conf b/src/etc/alternc/templates/apache2/wsgi-https.conf new file mode 100644 index 0000000..4b63fb0 --- /dev/null +++ b/src/etc/alternc/templates/apache2/wsgi-https.conf @@ -0,0 +1,43 @@ + + ServerName %%fqdn%% + DocumentRoot %%document_root%% + AssignUserId #%%UID%% #%%GID%% + SetEnv LOGIN "%%UID%%-%%LOGIN%%" + + SSLEngine On + SSLCertificateFile %%CRT%% + SSLCertificateKeyFile %%KEY%% + %%CHAINLINE%% + + + WSGIDaemonProcess %%fqdn%% python-home=%%VENV%% python-path=%%document_root%%/%%APP_SUBDIR%%/ socket-user=#%%UID%% + WSGIProcessGroup %%fqdn%% + WSGIScriptAlias / %%document_root%%/%%APP_SUBDIR%%/wsgi.py process-group=%%fqdn%% + + + + AllowOverride All + + + Order allow,deny + Allow from all + + = 2.4> + Require all granted + + + + + + + ServerName %%fqdn%% + AssignUserId #%%UID%% #%%GID%% + SetEnv LOGIN "%%UID%%-%%LOGIN%%" + + KeepAlive Off + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !/cgi-bin/ + RewriteCond %{REQUEST_FILENAME} !/.well-known/acme-challenge/ + RewriteRule ^/(.*)$ http://%%fqdn%%/$1 [R=301,L] +