Reputation: 52
I am trying to set VitualHost on MAMP Windows but it's not working. It's loading for 2-3 seconds and then showing Can't access this website
.
Here is my configuration:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot C:\MAMP\htdocs\website
ServerName project.local
ServerAlias www.project.local
<Directory "C:\MAMP\htdocs\website">
Allow from All
AllowOverride all
Options -Indexes +FollowSymlinks
</Directory>
UseCanonicalName on
</VirtualHost>
Apache is on 80 port.
What's wrong here ?
Thanks !
Upvotes: 0
Views: 147
Reputation: 422
Add following code in c:\Windows\System32\Drivers\etc\hosts
127.0.0.1 project.local
127.0.0.1 www.project.local
restart apache.
Upvotes: 1