I have recently discovered that some of the development websites on my local computer (Windows 10/Apache 2.4) are visible from the web when they should not be. the problem is similar to this question, but as no solutions were provided there (all of the questions asked in that post have been checked against, and verified to be correct), I'm asking my own question. Here are the relevant excerpts from the relevant files:
httpd.conf:
# directory and file names obfuscated intentionally
<Directory "P:/HTTP/{hidden}">
AllowOverride All
AuthType Basic
AuthName "Private Content - Authorized Use Only"
AuthUserFile P:/.htpasswd
Require valid-user
</Directory>
.htaccess (in P:/http/{hidden})
AuthType Basic
AuthName "You must log in to view this site."
AuthUserFile P:/.htpasswd
Require valid-user
(note: The AuthName entries are set differently in each in order to assist with debugging)
I know that the .htaccess file is being processed because if I add a line that would cause an error, said error occurs, but when no error occurs, I still don't get presented with an HTTP authentication login. The site just appears. This happens from every computer that I attempt to access the site from, not just my local machine. there are no error entries in my log files (except for the intentional HTTP 500 errors that were generated from a garbage line in .htaccess), AllowOverride
is set to ALL
, as can be seen in my excerpt, above, and there have been no recent changes to Apache since the last time I did a security test, about 2 months ago. The only change in the system has been through updates to Windows, but that should have no bearing regarding this issue.
The interesting thing is, on this same computer I have several VMs, all with different OS/Apache versions, and all of which point to the same document root (a SAMBA share on the local box), and all have similar (or identical) entries in their respective Apache config files, and they all work. It's just the Win10 host machine that has this problem.
Any suggestions or clues would be gratefully received.