This commit is contained in:
makram89 2022-01-30 18:23:31 +01:00
parent b6c99a4f02
commit 6d46a2a5de
4 changed files with 15 additions and 12 deletions

View File

@ -4,8 +4,8 @@ map $http_upgrade $connection_upgrade {
} }
upstream django { upstream django {
# server localhost:8080; server localhost:8080;
server unix:///home/randomsec/RandomSec/uwsgi-file/muor.sock; # server unix:///home/randomsec/RandomSec/uwsgi-file/muor.sock;
} }
@ -54,9 +54,9 @@ server {
# Finally, send all non-media requests to the Django server. # Finally, send all non-media requests to the Django server.
location / { location / {
if ($cookie_sessionid = ""){ if ($cookie_sessionid = ""){
# proxy_pass http://django; # TODO prolly change that to uwsgi_pass proxy_pass http://django; # TODO prolly change that to uwsgi_pass
uwsgi_pass django; # uwsgi_pass django;
include /etc/nginx/uwsgi_params; # include /etc/nginx/uwsgi_params;
} }

View File

@ -1,8 +1,8 @@
if ($cookie_sessionid = ""){ if ($cookie_sessionid = ""){
# proxy_pass http://django; # TODO prolly change that to uwsgi_pass proxy_pass http://django; # TODO prolly change that to uwsgi_pass
uwsgi_pass django; # uwsgi_pass django;
include /etc/nginx/uwsgi_params; # include /etc/nginx/uwsgi_params;
} }
} }

View File

@ -6,7 +6,9 @@ map $http_upgrade $connection_upgrade {
} }
upstream django { upstream django {
server unix:///home/randomsec/RandomSec/uwsgi-file/muor.sock; # server unix:///home/randomsec/RandomSec/uwsgi-file/muor.sock;
server localhost:8080;
} }
server { server {
@ -46,8 +48,9 @@ server {
} }
location /logout/ { location /logout/ {
uwsgi_pass django; # uwsgi_pass django;
include /etc/nginx/uwsgi_params; # include /etc/nginx/uwsgi_params;
proxy_pass http://django; # TODO prolly change that to uwsgi_pass
} }
# Finally, send all non-media requests to the Django server. # Finally, send all non-media requests to the Django server.

View File

@ -6,5 +6,5 @@ pidfile=/home/randomsec/uwsgi-file/project-master.pid
vacuum=True vacuum=True
max-requests=5000 max-requests=5000
daemonize=/home/randomsec/RandomSec/log/logs.log daemonize=/home/randomsec/RandomSec/log/logs.log
socket=/home/randomsec/RandomSec/uwsgi-file/muor.sock http=:8080