mirror of https://git.envs.net/envs/ops.git
nginx: add restricted location for users
This commit is contained in:
parent
776f9f93a5
commit
38143fde53
|
@ -99,7 +99,7 @@ server {
|
|||
}
|
||||
|
||||
# maubot
|
||||
location /_matrix/maubot/v1/logs {
|
||||
location ^~ /_matrix/maubot/v1/logs {
|
||||
# location /_matrix/maubot {
|
||||
include proxy_params;
|
||||
proxy_ssl_name $http_host;
|
||||
|
@ -135,6 +135,10 @@ server {
|
|||
fastcgi_param SCRIPT_FILENAME /home/$user/public_html$request_filename;
|
||||
}
|
||||
|
||||
location ~ /restricted/ {
|
||||
auth_basic "Restricted Area";
|
||||
auth_basic_user_file /home/$user/.htpasswd;
|
||||
}
|
||||
}
|
||||
|
||||
location ~* /\.(eot|ttf|woff|woff2)$ {
|
||||
|
|
|
@ -21,6 +21,11 @@ location ~ (\.cgi|\.py|\.sh|\.pl|\.lua|\/cgi-bin)$ {
|
|||
fastcgi_pass unix:/var/run/fcgiwrap.socket;
|
||||
}
|
||||
|
||||
location ~ /restricted/ {
|
||||
auth_basic "Restricted Area";
|
||||
auth_basic_user_file /home/$user/.htpasswd;
|
||||
}
|
||||
|
||||
if (!-d /home/$user/public_html) {
|
||||
return 307 https://envs.net/;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue