Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed apache via MacPorts but now I seem to have two Apache installations.

The first, the one that comes pre-installed on Mac has configuration at /private/etc/apache2. It can be launched with sudo apachectl start. The second, macports version, that I'm using has its configuration at /opt/local/apache2/ and can be started via a custom launchd script.

Could anyone tell me what would be the best approach to sorting this issue? Should I delete the macports version? I initially installed this because I seem to remember that virtualhosts could not be configured on the pre-installed version.

If it's possible I'd rather remove the pre-installed version of Apache.

Any help would be appreciated!

share|improve this question

You can just disable the preinstalled version (System Preferences, Sharing, Web Sharing) and it won't get in the way anymore.

share|improve this answer
+1 You won't want to remove the built-in install of apache as you may run into issues with future Software Updates. You can always put something like alias apachectl='/opt/local/apache2/bin/apachectl' in your ~/.bash_profile so you don't accidentally use the wrong apachectl. – morgant Aug 23 '10 at 19:25

The pre-installed version will work just fine and support Virtual Hosts as well. If you are more interested in simply having a web server without having to deal with the issues of configuration etc, I would suggest using MAMP (or MAMP-PRO).

I started using MAMP-PRO a little while back and I will never go back. I don't have to deal with web server issues at all. I simply create my virtual host using the GUI they provide and I am working on web content right away. MAMP is free. If you want to be able to configure virtual hosts using the GUI, you will need MAMP-PRO.

share|improve this answer

you shouldn't have any issues with virtual hosts with included apache. Look at "/etc/apache2/extra/httpd-vhosts.conf" example. But I believe is commented out in "/etc/apache2/httpd.conf" could that be why it didn't work for you, you just need to uncomment that Include line.

Also you should consider using homebrew .

share|improve this answer

Your Answer


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.