Reputation: 857
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:
What did i do wrong ? any advice ?
Upvotes: 2
Views: 62
Reputation: 943216
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
Upvotes: 2