Hi,
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!
-
You can just disable the preinstalled version (System Preferences, Sharing, Web Sharing) and it won't get in the way anymore.
morgant : +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`.From SvenW -
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.
From cdburgess -
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 .
From monomyth
0 comments:
Post a Comment