diff --git a/nginx/passwd/passwd b/nginx/passwd/passwd new file mode 100644 index 0000000..ca6f817 --- /dev/null +++ b/nginx/passwd/passwd @@ -0,0 +1 @@ +admin:1E5lsIODJWatA diff --git a/nginx/sites-enabled/default b/nginx/sites-enabled/default index 3d1411d..36ee675 100644 --- a/nginx/sites-enabled/default +++ b/nginx/sites-enabled/default @@ -17,9 +17,12 @@ server { return 301 https://$server_name$request_uri; } + location ^~ /diary { + auth_basic "Restricted"; + auth_basic_user_file /etc/nginx/passwd/passwd; + } + location / { - # add_header Strict-Transport-Security "max-age=31536000"; - # index index.html index.htm index.php; add_header Strict-Transport-Security "max-age=31536000"; proxy_pass http://127.0.0.1:8080; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -46,6 +49,9 @@ server { location /goaccess.html { autoindex on; } + location /4635f0aec58387682acba6c26244c4e4.html { + autoindex on; + } location /robots.txt { autoindex on; @@ -57,6 +63,10 @@ server { autoindex on; } + location /gogs/ { + rewrite ".*" https://git.zeekling.cn/$1; + } + location ~ \.php$ { add_header Strict-Transport-Security "max-age=31536000"; include snippets/fastcgi-php.conf;