2

I have a problem with creating a new virtual host on xampp. Here is my snippet

NameVirtualHost *:8080

<VirtualHost *:8080>
    ServerName origtravel.test
    DocumentRoot "D:\e.batgerel\development\projects\origtravelnew"
    DirectoryIndex index.php
    <Directory "D:\e.batgerel\development\projects\origtravelnew">
        AllowOverride All
        Allow from All
        Require all granted
    </Directory>
</VirtualHost>

And my hosts file:

127.0.0.1   localhost:8080
127.0.0.1   origtravel.test:8080

But result is:

enter image description here

What did i do wrong ? any advice ?

batgerel.e
  • 837
  • 1
  • 10
  • 31

1 Answers1

2

The hosts file maps hostnames to ip addresses.

It doesn't map ports to anything. Don't include port numbers in your hostnames.

127.0.0.1   localhost
127.0.0.1   origtravel.test
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335