OK, I'm in trouble... and it keeps getting worse and worse!
I'm on Windows 7, running XAMPP. I had defined scads of subdomains on localhost for different web projects; i.e. xyz.localhost, abc.localhost, etc. They were working fine. I add each subdomain in two steps:
I add a section to
httpd-vhosts.conf
that looks like this:<VirtualHost *> DocumentRoot "path/to/xampp/htdocs/xyz" ServerName xyz.localhost </VirtualHost>
I add an entry to my hosts file (C:\Windows\System32\drivers\etc\hosts) that looks like this:
127.0.0.1 xyz.localhost
Then I restart Apache. Bam. This has always worked and I haven't had to understand the deep inner workings of these files.
I turned on the computer today to find that all my localhost subdomains are suddenly not working. Chrome and Firefox both say they cannot find them. However, I could still access http://localhost
, and I could also access the subdomain folders by using http://127.0.0.1/xyz
.
After a little digging, I found this cryptic error in my error log:
VirtualHost _default_:443 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
So I grepped through files and found out that httpd-ssl.conf
has a section that starts with <VirtualHost _default_:443>
. However, that file has not been modified in years, so that's probably not the issue.
I tried changing my httpd-vhosts.conf
file:
- from
NameVirtualHost *
toNameVirtualHost *:80
, and <VirtualHost *>
to<VirtualHost *:80>
but that didn't work.
So randomly I thought, maybe I'd add a Listen 443
to httpd.conf
. That made it so Apache wouldn't start anymore, so I took it out.
What's going on?? What could have changed? I should hasten to add that I don't even know what relevance port 443 has to XAMPP. I don't ever access any of my local sites using SSL, and I don't need it. Can anyone help me? I'm poking around in the dark.