Reputation: 94
I am sure I will regret this but I have done tons of research throughout stackoverflow and the almighty google. I am just trying to setup a virtual host for my project and I followed a couple of tutorials for different methodologies but no matter what it either doesn't work at all or just redirects me to the xampp dashboard with the url lavamap.dev/dashboard
. Below I have included all the files I have been messing with, and yes I always restart Apache after changes.
Versions:
Windows- 10
Xampp - 3.2.2
Apache- 2.4
httpd-vhosts.conf
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/lavamap"
ServerName lavamap.dev
ServerAlias www.lavamap.dev
<Directory "C:/xampp/htdocs/lavamap">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
hosts
127.0.0.1 lavamap.dev
127.0.0.1 www.lavamap.dev
I also uncommented the following line from httpd.conf
Include conf/extra/httpd-vhosts.conf
Thanks for even taking the time to read this and even more thanks so for any responses! I'll take clues, hints, ideas or a solution.
Upvotes: 4
Views: 6795
Reputation: 651
I also faced the same problem. After googling for two days finally i got down to debug. The problem is with how google chrome is treating the url. It is redirecting all your url to https://lavamap.dev/dashboard and for this the port is by default 443. That's why it seems like httpd-vhosts.conf is not working properly. But here comes the other file in action i.e. httpd-ssl.conf. For any https protocoal the virtual host entries goes in to this file. so you have to make virtual host entry in httpd-ssl.conf. Hopefully it will solve your problem.
Upvotes: 0
Reputation: 94
There is no real answer! As far as I could tell I just uninstalled and reinstalled and it worked fine. The funny part is I did the same steps in my home environment and it only works in firefox and not chrome. I may just be bad with apache but damn it feels a little unstable. I wish I could post an answer that would help other more.
Upvotes: 1