phplaravelapachexamppvirtualhost

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 "mytestdomain.local" but when I type this address into google chrome I am always redirected to the xampp dashboard at this address "https://mytestdomain.local/dashboard/".

I've installed Laravel in the following xampp directory: c:/xampp/htdocs/mytestdomain_uk.

I have "C:\xampp\apache\conf\extra\httpd-vhosts.conf" set up as follows:

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

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

And I have "C:\Windows\System32\drivers\etc\hosts" set up as follows:

127.0.0.1   localhost
127.0.0.1   mytestdomain.local

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


Solution

  • 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!