From 6fd437363acb1a9ae61cb4330633ff2294cf3f58 Mon Sep 17 00:00:00 2001 From: Castro0o Date: Tue, 9 Jun 2020 17:47:40 +0200 Subject: [PATCH] update on nginx config and service file --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8a0fa06..75ae627 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ User=psc Group=www-data WorkingDirectory=/var/www/TacticalApp Environment="PATH=/var/www/TacticalApp/venv/bin" -ExecStart=/var/www/TacticalApp/venv/bin/gunicorn --workers 4 --bind unix:app.sock -m 007 app:app +ExecStart=/var/www/TacticalApp/venv/bin/gunicorn --env SCRIPT_NAME=/watermarks --workers 4 --bind unix:app.sock -m 007 app:app [Install] WantedBy=multi-user.target @@ -48,12 +48,10 @@ It is also a good idea to check the status of the service ``` location / { - include proxy_params; - # it will pass the requests to the socket - proxy_pass http://unix:/var/www/TacticalApp/app.sock; - # @andre: unsure whether we need a proxy_redirect as well - # if so, it might be somthing like - # http://unix:/var/www/TacticalApp/app.sock $scheme://$host:80/; + # if using gunicorn with app sock, use: + proxy_pass http://unix:/var/www/TacticalApp/app.sock; + # if using gunicord with port 5000, use: + proxy_pass http://127.0.0.1:5000; } ``` @@ -86,3 +84,5 @@ But in the long run logging should be disabled * added page /test `watermarks/test` for testing url_for() - correct * made urls relative +* service file with `--env SCRIPT_NAME=/watermarks` see above +*