To start apache
sudo apachectl start
This will give you a basic Apache server with a DocumentRoot at /Library/WebServer/Documents/
You can enable things like PHP and virtualhosts by making use of the configuration file, which must be edited as root:
/etc/apache2/httpd.conf
Restart the apache server (like after editing the config file) with
sudo apachectl graceful
Stop the apache server
sudo apachectl graceful-stop
I believe in order to use user directories (like allowing ~/Sites/
to be accessed at http://localhost/~username/
) or to get httpd to run at startup, you will need to do a little tweaking. I unfortunately can't test how easy it is to get the full functionality of the previous versions back since my Apache configs did not come from a "clean" 10.8 install.
~/Sites/
then please tell me. ;) – greduan Oct 05 '12 at 02:44/etc/apache2/extras/httpd-userdir.conf
is being properly imported at the end of the main configuration file. If~/Sites
already exists, that may be all you have to do... – NReilingh Oct 05 '12 at 03:04/>httpd -S
from Terminal and it pointed out the error of my ways. – Shanimal Oct 05 '12 at 14:46