7
votes
Accepted
Permission denied: Could not open password file.
You are having this problem because of SELinux security context.
To overcome this you need to change the selinux label of the directory/file in question.
You can find out the apache process security ...
- 8,941
4
votes
Permission denied: Could not open password file.
With SELinux enabled Apache is unable to read files unless they are of the same type domain as the running process.
First, check the type domain of the httpd process.
ps axZ|grep httpd
Second, ...
- 883
2
votes
Accepted
HTTP Basic Auth unless connecting from the office with Apache 2.4?
Without the complete error message (I would expect the module and ip-address) it's a bit of a guess but you're mixing directives from two different modules in Apache 2.4 , the Require directive from ...
- 74k
2
votes
Accepted
HTTP .htpasswd protect sub-domain on Nginx recursively
To protect the entire subdomain, the statements should appear in the existing server block:
server {
server_name dev.example.com;
auth_basic "Administrator Login";
auth_basic_user_file /...
- 12.4k
2
votes
How to remove .htaccess and/or htpasswd from vultr wordpress installation
I found the culprits here:
/etc/nginx/conf.d/wordpress_http.conf
and
/etc/nginx/conf.d/wordpress_https.conf
I commented out these lines:
# auth_basic "Restricted";
# ...
- 137
1
vote
Apache 2.4 ignoring basic authentication
`This is a complete working Virtalhost, you have to adapt it to your Solution.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}...
- 1,507
1
vote
Why is my .htaccess and .htpasswd not working?
AuthUserFile ./.htpasswd
The file-path to your password file is most certainly wrong. This should be an absolute filesystem path. (Or a relative path, relative to the ServerRoot).
For example, ...
- 12.1k
1
vote
htaccess + htpasswd: how to prevent executing php scripts without specifying a password
Looking at Apache documentation on Authentication, Authorization, and Access Control, unfortunately it seems that it is not possible to logout.
So the problem is not that http://mysite/fill/do.php ...
- 468
1
vote
How to remove .htaccess and/or htpasswd from vultr wordpress installation
As Orphans suggests, you do basically just "remove it". You need to remove the relevant code from the .htaccess file (probably in the protected directory), or delete the file altogether if that is the ...
- 12.1k
1
vote
Permission denied: Could not open password file.
Try wrapping your AuthUserFile in
AuthType Basic
AuthName "Restricted Access"
AuthUserFile "/var/www/html/server-auth/.htpasswd"
Require user manu
That solved the issues for me.
1
vote
Accepted
Force https before authentification - no access to vhost
There is an SSLRequireSSL directive which might work for you here - http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslrequiressl
- 386
1
vote
How to create and edit .htaccess and .htpasswd locally on my computer and then upload to my site via ftp?
The generator in the accepted answer seems to no longer be active. However, this one seems to work: https://www.askapache.com/online-tools/htpasswd-generator/
- 275
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
.htpasswd × 47.htaccess × 36
apache-2.2 × 20
apache-2.4 × 8
htpasswd × 7
ssl × 5
nginx × 4
linux × 3
http-basic-authentication × 3
php × 2
https × 2
authentication × 2
wordpress × 2
apache2 × 2
directory × 2
windows × 1
ubuntu × 1
debian × 1
security × 1
permissions × 1
virtualhost × 1
ftp × 1
mod-rewrite × 1
port × 1
subdomain × 1