remove unnecessary todos and comments

This commit is contained in:
prance 2022-01-31 19:11:11 +01:00
parent 5a1ba3754d
commit 173accd866
3 changed files with 9 additions and 49 deletions

View File

@ -5,8 +5,6 @@ map $http_upgrade $connection_upgrade {
upstream django { upstream django {
server localhost:8080; server localhost:8080;
# server unix:///home/randomsec/RandomSec/uwsgi-file/muor.sock;
} }
@ -20,25 +18,14 @@ server {
return 404; return 404;
} }
# configuration of the server
server { server {
# the port your site will be served on
listen 443 ssl http2 reuseport; listen 443 ssl http2 reuseport;
# the domain name it will serve for
server_name randomsec.projektstudencki.pl server_name randomsec.projektstudencki.pl
charset utf-8; charset utf-8;
# max upload size # max upload size
client_max_body_size 75M; # adjust to taste client_max_body_size 75M; # adjust to taste
# location /static {
# alias /path/to/static; #TODO add path
# expires 30d;
# access_log off;
# add_header Pragma public;
# add_header Cache-Control "public";
# }
error_page 502 /loader.html; error_page 502 /loader.html;
location = /loader.html { location = /loader.html {
@ -46,7 +33,7 @@ server {
} }
location /static/ { location /static/ {
alias /home/randomsec/RandomSec/MUOR/staticfiles/; # your Django project's static files - amend as required alias /home/randomsec/RandomSec/MUOR/staticfiles/;
expires 2d; expires 2d;
access_log off; access_log off;
add_header Pragma public; add_header Pragma public;
@ -54,20 +41,14 @@ server {
} }
location /logout/ { location /logout/ {
# uwsgi_pass django; proxy_pass http://django;
# 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.
location / { location / {
proxy_pass http://django; # TODO prolly change that to uwsgi_pass proxy_pass http://django;
if ($cookie_sessionid = ""){ if ($cookie_sessionid = ""){
proxy_pass http://django; # TODO prolly change that to uwsgi_pass proxy_pass http://django;
# uwsgi_pass django;
# include /etc/nginx/uwsgi_params;
} }
} }
@ -77,6 +58,5 @@ server {
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
# add_header Strict-Transport-Security max-age=31536000; # add_header Strict-Transport-Security max-age=31536000;
} }

View File

@ -1,8 +1,6 @@
if ($cookie_sessionid = ""){ if ($cookie_sessionid = ""){
proxy_pass http://django; # TODO prolly change that to uwsgi_pass proxy_pass http://django;
# uwsgi_pass django;
# include /etc/nginx/uwsgi_params;
} }
} }
@ -11,6 +9,5 @@
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
# add_header Strict-Transport-Security max-age=31536000; # add_header Strict-Transport-Security max-age=31536000;
} }

View File

@ -1,16 +1,13 @@
map $http_upgrade $connection_upgrade { map $http_upgrade $connection_upgrade {
default upgrade; default upgrade;
'' close; '' close;
} }
upstream django { upstream django {
# server unix:///home/randomsec/RandomSec/uwsgi-file/muor.sock;
server localhost:8080; server localhost:8080;
} }
server { server {
if ($host = randomsec.projektstudencki.pl) { if ($host = randomsec.projektstudencki.pl) {
return 301 https://$host$request_uri; return 301 https://$host$request_uri;
@ -21,25 +18,14 @@ server {
return 404; return 404;
} }
# configuration of the server
server { server {
# the port your site will be served on
listen 443 ssl http2 reuseport; listen 443 ssl http2 reuseport;
# the domain name it will serve for
server_name randomsec.projektstudencki.pl server_name randomsec.projektstudencki.pl
charset utf-8; charset utf-8;
# max upload size # max upload size
client_max_body_size 75M; # adjust to taste client_max_body_size 75M; # adjust to taste
# location /static {
# alias /path/to/static; #TODO add path
# expires 30d;
# access_log off;
# add_header Pragma public;
# add_header Cache-Control "public";
# }
error_page 502 /loader.html; error_page 502 /loader.html;
location = /loader.html { location = /loader.html {
@ -47,7 +33,7 @@ server {
} }
location /static/ { location /static/ {
alias /home/randomsec/RandomSec/MUOR/staticfiles/; # your Django project's static files - amend as required alias /home/randomsec/RandomSec/MUOR/staticfiles/;
expires 2d; expires 2d;
access_log off; access_log off;
add_header Pragma public; add_header Pragma public;
@ -55,12 +41,9 @@ server {
} }
location /logout/ { location /logout/ {
# uwsgi_pass django; proxy_pass http://django;
# 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.
location / { location / {
proxy_pass http://django; # TODO prolly change that to uwsgi_pass proxy_pass http://django;