Basic Auth on Apache 2.4 Forward Proxy
Posted: 25. June 2017 13:06
Website X is a public site that can be accessed only via Basic Authentication. Once I browse to it, I'll be prompted with a dialog box where I need to type in my username and password to authorize myself and access the website. With that said, I'm looking into setting up a forward proxy using Apache to do the Basic-Auth automatically, so I don't get prompted each time I access the site.
I've configured a forward proxy using Apache 2.4, and it seems to work fine as a forward proxy, as I could access HTTP and HTTPS websites through it. However, the Basic-Auth I'm trying to do on the X website, doesn't work. I still get the dialog box each time I navigate to the site.
In the "httpd.conf", I tried multiple configurations, one example is:
Mentioning that the password.file contains my username and password as a result of executing the command line:
The Apache starts successfully without throwing any errors.
IMHO, what I'm trying to do sounds technically possible. However, after several hours of trial and error, it doesn't seem as easy as I thought it would be. Suggestions?
I've configured a forward proxy using Apache 2.4, and it seems to work fine as a forward proxy, as I could access HTTP and HTTPS websites through it. However, the Basic-Auth I'm trying to do on the X website, doesn't work. I still get the dialog box each time I navigate to the site.
In the "httpd.conf", I tried multiple configurations, one example is:
- Code: Select all
AuthType Basic
AuthName "Restricted Site"
# (Following line optional)
AuthBasicProvider file
AuthUserFile password.file
Require valid-user
Mentioning that the password.file contains my username and password as a result of executing the command line:
- Code: Select all
htpasswd -c password.file MyUser
The Apache starts successfully without throwing any errors.
IMHO, what I'm trying to do sounds technically possible. However, after several hours of trial and error, it doesn't seem as easy as I thought it would be. Suggestions?