I am trying to create a local domain name for my xampp project
But the dns is not resolving it is not redirecting correctly.
/hosts/etc
127.0.0.1:8081 mydomainname.test
virtualhost
<VirtualHost *:8081>
DocumentRoot "C:/xampp/htdocs/sam"
ServerName mydomainname.test
ServerAlias mydomainname.test
<Directory "C:/xampp/htdocs/sam">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order Deny,Allow
Allow from all
Options All
Require all granted
</Directory>
</VirtualHost>
2
Answers
Change the file a little
Read more here: https://httpd.apache.org/docs/trunk/vhosts/examples.html#port
It’s
/etc/hosts
. And it does not accept ports and should look like:mydomainname.test 127.0.0.1