Apache Restart on OS X

Posted by: squareman

Apache Restart on OS X - 09/27/03 04:39 PM

Anyone know the terminal command to get Apache to restart on OS X? I'm trying to avoid restarting altogether to get it to recognize mods I made to php.ini and SystemStarter doesn't restart Apache since it's already running.<br><br><pre>feh!</pre><p>
Posted by: JonnyCat

Re: Apache Restart on OS X - 09/27/03 04:50 PM

apachectl stop<br>apachectl start<br><br>or combined<br><br>apachectl restart<br><br>[color:blue]My only goal in life is to live forever - so far so good!</font color=blue>
Posted by: squareman

Re: Apache Restart on OS X - 09/27/03 05:06 PM

Hmm. Tried it and I get the following:<br><br><pre>Last login: Sat Sep 27 17:03:13 on ttyp1<br>Welcome to Darwin!<br>[localhost:~] john% apachectl restart<br>/usr/sbin/apachectl restart: httpd not running, trying to start<br>Processing config directory: /private/etc/httpd/users<br> Processing config file: /private/etc/httpd/users/gigi.conf<br> Processing config file: /private/etc/httpd/users/guest.conf<br> Processing config file: /private/etc/httpd/users/john.conf<br>[Sat Sep 27 17:03:43 2003] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName<br>fopen: Permission denied<br>httpd: could not open error log file /private/var/log/httpd/error_log.<br>/usr/sbin/apachectl restart: httpd could not be started<br>[localhost:~] john% </pre><p> <br><br>Should I do it via sudo?<br><br><pre>feh!</pre><p>
Posted by: nutty

Re: Apache Restart on OS X - 09/27/03 05:08 PM

Under OSX client?<br><br>system preferences, web sharing stop<br><br>start<br><br>
Posted by: JonnyCat

Re: Apache Restart on OS X - 09/27/03 05:10 PM

makes sense to use sudo<br><br>I start and restart my remote server as the root user <br><br>[color:blue]My only goal in life is to live forever - so far so good!</font color=blue>
Posted by: squareman

Re: Apache Restart on OS X - 09/27/03 05:11 PM

HA HA HA HA. Oh sh!, do I feel stupid now. Yup, that worked just fine. It reloaded the php.ini and recognized the new settings in that file. . I should have guessed there would have been an easier solution.<br><br><pre>feh!</pre><p>
Posted by: squareman

Re: Apache Restart on OS X - 09/27/03 05:14 PM

Yup, despite nutty's easy method, sudo did work in the terminal as well (good to know so I can do it remotely if I ever need to).<br><br><pre>feh!</pre><p>
Posted by: nutty

Re: Apache Restart on OS X - 09/27/03 05:18 PM

no prob<br><br>if you know php then you dont always think of the easiest way to kill apache and restart it.<br><br>now you have 2 ways<br><br>cheers<br><br>