Skip to content
Advertisement

Apache virtual host always redirecting to /dashboard

I’m having what appears to be a common problem but any solutions I’ve found don’t seem to work for my case.

I’m trying to set up a virtual host so that I can access the public file of my Laravel installation by going to “walkpeakdistrict.local” but when I type this address into google chrome I am always redirected to the xampp dashboard at this address “https://walkpeakdistrict.local/dashboard/“.

I’ve installed Laravel in the following xampp directory: c:/xampp/htdocs/walkpeakdistrict_uk.

I have “C:xamppapacheconfextrahttpd-vhosts.conf” set up as follows:

<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs"
    ServerName localhost
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/walkpeakdistrict_uk/public"
    ServerName walkpeakdistrict.local
</VirtualHost>

And I have “C:WindowsSystem32driversetchosts” set up as follows:

127.0.0.1   localhost
127.0.0.1   walkpeakdistrict.local

If anyone could offer any insight into this issue I would be very grateful.

Advertisement

Answer

Ok, I’m not sure why this was an issue but it seems to work when I change the virtual host’s server name to anything other than “.local”.

Thanks again to all who replied!

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement