views:

325

answers:

2

Am trying to reload Apache 2 via /init.d/apache2 reload command in terminal but I get a command not found error and when I look at the etc/ directory in Finder I can't see any init.d folder. Is there somewhere else this init.d folder might be?

+1  A: 

Just type in the terminal:

sudo apachectl graceful

graceful reloads the configuration files and gracefully restarts. Any current connections are allowed to complete.

For more info on the apachectl command just type:

man apachectl
rogeriopvl
Thanks. Much appreciated.
A: 

And if that doesn't work, you can try sudo apachectl restart. Just for reference, OS X doesn't use init.d (although it used to); it uses launchd instead. See http://launchd.macosforge.org/.

Benjamin Oakes
THanks too. That was driving me mental.