Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Apache 1.3.27 on WinXP - no HTTP authentication dialog box

Posted on 2003-02-27
Medium Priority
Last Modified: 2010-03-04
Ok I am pretty sure I have done everything right. I know that I should be using Apache on a UNIX or Linux box, but this is for learning purposes.

I have read quite a few response on here and none have solved my problem.

I have placed the following in my httpd.conf and opted against an .htaccess file

<Directory "C:/Program Files/Apache Group/Apache/htdocs/phpmyadmin/">
    AuthUserFile "C:/Program Files/Apache Group/Apache/pswds/.htpass"    
    AuthType Basic
    AuthName "Database Config - Restricted Access"
    require valid-user  

this returns:

401 - Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.


Apache/1.3.27 Server at localhost Port 80

The problem is that the dialog box that should come up doesn't. What am i doing wrong?

Question by:ricbax
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Assisted Solution

linxit earned 135 total points
ID: 8042219
How have you created the .htpass file? Does it contain all the users you want? It should look something like


The correct way is to run (for the first name)

htpasswd -c C:/Program Files/Apache Group/Apache/pswds/.htpass username

Then enter the password at the prompt

This also creates the file and truncates it if it exists, so for subsequent users you have to run the command without the -c flag.


Accepted Solution

goodatunix earned 150 total points
ID: 8042563
The Directory Directive is based off of your Document Root.  If your Docuemnt Root is C:/Program Files/Apache Group/Apache/htdocs then you should set your Directory Directive as follows.

<Directory /phpmyadmin>
   AuthUserFile "C:/Program Files/Apache Group/Apache/pswds/.htpass"    
   AuthType Basic
   AuthName "Database Config - Restricted Access"
   require valid-user  

That should work provided you have created the password file as mentioned above.


Expert Comment

ID: 8046595

just a thought that you are using cgi version og PHP and it dosent allow your http auth. to working with http auth you have to have ISAPI version of php installed on you IIS.
To use the ISAPI module, do the following:

    If you don't want to perform HTTP Authentication using PHP,
    you can (and should) skip this step. Under ISAPI Filters,
    add a new ISAPI filter. Use PHP as the filter name, and
    supply a path to the php4isapi.dll.

    Under 'Home Directory', click on the 'Configuration' button.
    Add a new entry to the Application Mappings. Use the path
    to the php4isapi.dll as the Executable, supply .php as the
    extension, leave Method exclusions blank, and check the
    Script engine checkbox.

    Stop IIS completely (net stop iisadmin)
    Start IIS again  (net start w3svc)

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question