From d4f3111c12344ec12d946cda48003c8ef997268d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szekeres=20Ba=CC=81lint?= Date: Sun, 2 Dec 2018 21:36:18 +0100 Subject: [PATCH] Python support fixes #34 --- README.md | 5 ++ public/assets/js/app.js | 20 +++++++ public/index.html | 53 ++++++++++++++++++- public/templates/conf/nginx.conf.html | 7 +++ .../nginxconfig.io/python_uwsgi.conf.html | 9 ++++ .../sites-available/example.com.conf.html | 12 +++++ 6 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 public/templates/conf/nginxconfig.io/python_uwsgi.conf.html diff --git a/README.md b/README.md index dae3ac7..4689297 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,11 @@ * Drupal security essentials * Magento security essentials +### Python +* Python +* Python server +* Python backup server + ### Routing * `index` * Fallback routing diff --git a/public/assets/js/app.js b/public/assets/js/app.js index a0d1f89..393beac 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -54,6 +54,10 @@ drupal: false, magento: false, + python: false, + python_server: '/tmp/uwsgi.sock', + python_server_backup: '', + file_structure: 'modularized', symlink: true, @@ -547,6 +551,14 @@ return $scope.isPHP() && $scope.data.magento; }; + $scope.isPython = function() { + return $scope.data.python; + }; + + $scope.isPythonBackup = function() { + return $scope.isPython() && !!$scope.data.python_server_backup; + }; + $scope.isCSP = function() { return !!$scope.data.content_security_policy; }; @@ -600,6 +612,14 @@ $scope.refreshHighlighting(); $scope.updateHash(); + // toggle PHP <-> Python + if ($scope.data.php && !oldValue.php) { + $scope.data.python = false; + } else if ($scope.data.python && !oldValue.python) { + $scope.data.php = false; + } + + // default index file if (!$scope.data.php) { $scope.defaultData.index = 'index.html'; } else { diff --git a/public/index.html b/public/index.html index c3c6a99..9882181 100644 --- a/public/index.html +++ b/public/index.html @@ -8,9 +8,9 @@ nginxconfig.io - + - + @@ -49,6 +49,9 @@ + @@ -455,6 +458,42 @@ +
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
@@ -835,6 +874,16 @@
+
+ /etc/nginx/nginxconfig.io/python_uwsgi.conf + + Copied! +
+
+
+
/etc/nginx/nginxconfig.io/proxy.conf