Basic Auth on Apache 2.4 Forward Proxy

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Basic Auth on Apache 2.4 Forward Proxy

Postby Bilal » 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:
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?
Bilal
 
Posts: 1
Joined: 25. June 2017 13:00
XAMPP version: 5.6
Operating System: Windows 2008

Re: Basic Auth on Apache 2.4 Forward Proxy

Postby Nobbie » 25. June 2017 20:43

Bilal wrote: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


Why? For what? Website X (which seems to be NOT your Website) is already doing a similar Basic Auth - what is the idea of doing a Basic Auth on your Xampp server as well?

Instead i cannot see any code which shows your Proxy configuration. How is it implemented? Please show your configuration.
Nobbie
 
Posts: 9683
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 72 guests