So I'm pretty sure I set up my Virtual Hosts right, but they don't seem to be working.

Yes, I have uncommented the vhosts include from httpd.conf.

All I get when I try to access the virtual hosts is a browser "Page cannot be found page". If I start my Mac's apache server (sudo /usr/sbin/httpd -k start), I get an Apache 404 page when trying to access the virtual hosts.

I've tried uninstalling and reinstalling MAMP and I've tried editing the /etc/apache2/ httpd files, both to no avail.


All I had to do to fix this was open up httpd.conf and change the line that says "Listen 8888" to "Listen 80"

I got a theory on why they don't have it running on port 80 to begin with, but I figure in the interest of not spreading nasty rumours, I'll keep that theory to myself.

Another issue I came across: by default, MAMP sets the localhost/ directory to the MAMP/htdocs/ folder. Thing is, if you keep your files in another directory, your .htaccess files won't work. Why? Because in httpd.conf, AllowOverride All is only set on MAMP/htdocs by default. Set it at the main level, or on a specific directory, and all should be well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.