jeudi 21 février 2019

Can't access localhost/domain error 404 not found but can access localhost in xampp

i already make a file in htdocs on xampp (file name netlabcorp.com) and add the index.html. I also already add a localhost in Hosts file (127.0.0.1 netlabcorp.com) and add these lines in httpd-vhosts.conf

NameVirtualHost *:80 
<VirtualHost *:80> 
ServerAdmin admin@netlabcorp.com 
DocumentRoot "C:\xampp\htdocs\netlabcorp.com" 
ServerName netlabcorp.com 
ServerAlias www.netlabcorp.com 
<Directory "C:\xampp\htdocs\netlabcorp.com"> 
Allow from All 
</Directory> 
</VirtualHost> 

Now, i can access this localhost by accessing "localhost" on the browser (apache work fine). But I cannot access the file when using "localhost/netlabcorp.com" (the result is object not found 404) and using the domain name (netlabcorp.com/www.netlabcorp.com) (the result is cant connect to the server)

Do you guys have any answer about my problem? Thankyou




Aucun commentaire:

Enregistrer un commentaire