How to restart Apache

I am having trouble starting my web server and filemaker pro server. I think it would help if I could restart Apache. Does anyone know what the commands are for doing this on Leopard Server in terminal?

MacPro, MacBook Pro, InteliMac, AlumiMac, MacBook, Mac OS X (10.5)

Posted on Mar 11, 2008 11:21 AM

Reply
3 replies

Mar 11, 2008 6:58 PM in response to J Moore

Hi,

Go to http://www.apple.com/server/macosx/resources/ and download the *Command-Line Administration* PDF. On page 212 is info on restarting the Apache web server. However, be aware that you should not use the +apachectl graceful+ command to gracefully restart the server when editing configuration files, as you would normally with Linux, etc. This is explained in the *Web Technologies Administration* PDF under 'Working with Apache' on page 86-90. It has to do with the webperfcache.

Larry

Mar 12, 2008 8:32 AM in response to J Moore

to restart apache safely with Terminal, under root

serveradmin stop web; serveradmin start web


If you’ve made some modifications on some apache config files by hand (which means not using Server Admin/Web anymore usually), it’s a good idea to test the configuration before restarting Apache.
Then you can use the apachectl command:

apachectl -t


to restart only teams server :

serveradmin stop teams; serveradmin start teams


Once the services says they have restarted give them few more seconds before trying to access them.

That’s my experience anyways. Hope it helps.

Apr 15, 2008 6:03 PM in response to Thyb

I configured Apache after installing Leopard and it was working fine. But now some thing happened and it will not start. I do the

apachectl -t

and get
Syntax error on line 163 of /private/etc/apache2/httpd.conf:
DocumentRoot must be a directory


On line 163 I have changed to my Sites directory, DocumentRoot "/Users/matsaki/Sites"

Any ideas how to continue finding the error? (how the hll did this get messed up =( )

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to restart Apache

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.