Unknown error when setting up virtual host in MAMP
I’m struggling for half day just to setup virtual host in MAMP.
/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
1 | NameVirtualHost *:80 |
and for the file /Applications/MAMP/conf/apache/httpd.conf
Change from
1 | # Virtual hosts |
to
1 | # Virtual hosts |
to uncomment the httpd-vhosts.conf
In /etc/hosts, add a line below
1 | 127.0.0.1 www-yourproject.com |
I’ve done all these setting, but the MAMP still not able to start.
At the end, I figured out that the error was occurred in
1 | <Directory "/path/to/project"> |
this portion. It look correct and no mistake at all.
After struggling for half day, I re-type that portion of code, finally it works.
Damnnnn, it was those special characters error which we cannot see.
May be I’m too lucky to meet such a situation :)