Reputation: 1722
I am writing one web application using php, But I don't know how to access my website directly from localhost.
I have configured VirtualHost in apache but still not working,
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/top10"
ServerName top10.com
<Directory "C:/wamp/www/top10" >
allow from all
order allow,deny
AllowOverride all
</Directory>
DirectoryIndex index.html index.php
</VirtualHost>
I have also add the same ServerName entry in hosts file
When I try to access I am getting following error
Not Found
The requested URL / was not found on this server.
Apache/2.4.9 (Win32) PHP/5.5.12 Server at top10.com Port 80
I want to access my website as http://top10.com instead of http://localhost/top10.
Could you please help me for this
Upvotes: 0
Views: 44
Reputation: 791
Open hosts file ( AS Administrator ) in C:/Windows/System32/drivers/etc/ and add the following line ( Don't delete anything )
127.0.0.1 myWebsite.local
change myWebsite.local as per your name requirements
Upvotes: 1