Python support

fixes #34
This commit is contained in:
Szekeres Bálint
2018-12-02 21:36:18 +01:00
parent 382aaf32a4
commit d4f3111c12
6 changed files with 104 additions and 2 deletions

View File

@@ -20,6 +20,13 @@ http {<!--
server {{ data.php_server[0] === '/' ? 'unix:' : '' }}{{ data.php_server }};
server {{ data.php_server_backup[0] === '/' ? 'unix:' : '' }}{{ data.php_server_backup }} backup;
}
</span><!--
✔ Python backup --><span ng-if="isPythonBackup()">
upstream python {
server {{ data.python_server[0] === '/' ? 'unix:' : '' }}{{ data.python_server }};
server {{ data.python_server_backup[0] === '/' ? 'unix:' : '' }}{{ data.python_server_backup }} backup;
}
</span>
charset utf-8;
sendfile on;

View File

@@ -0,0 +1,9 @@
# default uwsgi_params
include uwsgi_params;
# uwsgi settings
uwsgi_pass {{ !isPythonBackup() ? ((data.python_server[0] === '/' ? 'unix:' : '') + data.python_server) : 'python' }};
uwsgi_param Host $host;
uwsgi_param X-Real-IP $remote_addr;
uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for;
uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto;

View File

@@ -57,6 +57,18 @@ server {<!--
try_files $uri $uri/ /index.php?$query_string;
}</span><!--
✔ Python --><span ng-if="isPython()">
# Python
location / {<!--
✔ modularized --><span ng-if="isModularized()">
include nginxconfig.io/python_uwsgi.conf;</span><!--
✔ unified --><span ng-if="isUnified()">
<!-- --> <ng-include ng-include-tabs="3" src="'templates/conf/nginxconfig.io/python_uwsgi.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></ng-include></span>
}</span><!--
✔ Reverse proxy --><span ng-if="isProxy()">
# reverse proxy