Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Oct 6 '11 at 7:13

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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