I'm trying to change how I access my website from WAMP server. I can access it like xxx.xxx.xxx.xxx/name, yes, it works perfectly fine. I searched up on how to change "xxx.xxx.xxx.xxx/name" to a domain name like www.name.com, I got some results but none of them worked. These are the things I did:
First I went to my host file
C:\Windows\System32\drivers\etc
, added a line "127.0.0.1 mytestdomain.com", this is how it looks: host file
Next, I changed "#Include conf/extra/httpd-vhosts.conf" to "Include conf/extra/httpd-vhosts.conf" from httpd.conf located at:
"D:\wamp64\bin\apache\apache2.4.27\conf"
.
Lastly, I added
<VirtualHost mytestdomain.com>
DocumentRoot "D:/wamp64/www/myTestDomain/"
ServerName mytestdomain.com
ServerAlias mytestdomain.com
<Directory "D:/wamp64/www/myTestDomain/">
Order allow, deny
Allow from all
</Directory>
</VirtualHost>
on "httpd-vhosts.conf" located at:
"D:\wamp64\bin\apache\apache2.4.27\conf\extra"
Oh, and yes, this is inside myTestDomain folder: myTestDomain
After doing all this, I restarted WAMP and went to my domain main, but it doesn't seem to be working, meanwhile "xxx.xxx.xxx.xxx/myTestDomain" does seem to be working.