-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protected Directories Access Control Bypassed When Using Proxy #967
Comments
I'm not sure if we can fix this unfortunately, as in Apache the |
This issue can be addressed by transferring the directives from the For instance, consider a AuthUserFile "/home/krisknez/domains/app.example.com/public_html/.htpasswd"
AuthType Basic
AuthName "Entire website"
require valid-user
<Files .htpasswd>
deny from all
</Files> These directives can be migrated into the vhost configuration as shown below: ...
# Password Protect While Proxying
<Location "/">
AuthUserFile "/home/krisknez/public_html/.htpasswd"
AuthType Basic
AuthName "Entire website"
require valid-user
</Location>
<Files .htpasswd>
deny from all
</Files>
... What do you think about this? |
Yes, that would work. However, it requires giving the domain owner permissions to edit the global Apache config, whereas the |
Description
When enabling "Protected Directories," an
.htaccess
file is automatically created in the specified directory. The file typically contains the following rules:The credentials for authorized users are stored in the
.htpasswd
file. This setup works as intended until a proxy is configured for the website. When the proxy settings are added to the virtual host (vhost) file, the.htaccess
rules are bypassed and no longer enforced.Steps to Reproduce
Entire website
directory protection viaWeb Configuration -> Protected Directories
.Web Configuration -> Edit Proxy Website
Expected Behavior
Access control should be enforced regardless of whether a proxy is configured for the website.
Actual Behavior
The
.htaccess
file is bypassed, allowing unrestricted access to the protected directory.The text was updated successfully, but these errors were encountered: