I thought this might be as simple as renaming the 1.33 httpd binary
under /usr/sbin to something else, and then creating a symbolic link
from /usr/sbin/httpd to /usr/local/apache2/bin/httpd. And when I hit
"start" under "Personal Web Sharing," it does in fact seem to start
the server. But the panel just sits there like it's waiting for the
start to occur.
What else do I need to change so the panel knows when the server's
running?
> I'm upgrading Apache on my Tiger installation from 1.33 to 2.0.59.
> I've compiled it from source, can start and stop it from the shell,
> and now I'd like to be able to start and stop it using the "Personal
> Web Sharing" controls under "System > Sharing."
I remember doing this, I had to write my own little startup item to get
it to boot. Or you could just use apachectl.
--
W. Oates
Seems like there'd be a way to hook it up with System Preferences >
Sharing, though, no?
--
JR
I figured it out. I was thinking about ways that the Sharing control
panel would even be able to know if Apache was running or not, and I
figured that it boiled down to either (a) checking port 80 or (b)
checking for a pid file. And (a) seems unlikely.
So I found the original httpd.conf file under /etc/httpd, and checked
for a PidFile directive:
PidFile "/private/var/run/httpd.pid"
And then I replaced the PidFile directive in /usr/local/apache2/conf/
httpd.conf with that line. Now I can start and stop apache from System
Prefs > Sharing.
Now I just need to figure out how to do this for MySQL, too. :)
Great! Thanks for posting this so others can benefit from it!
> Now I just need to figure out how to do this for MySQL, too. :)
That may be a bit harder. I've never added services to the list. You
may not be able to do that.
--
JR
They have OS X native applications and system prefs to do this.
> I figured it out. I was thinking about ways that the Sharing control
> panel would even be able to know if Apache was running or not, and I
> figured that it boiled down to either (a) checking port 80 or (b)
> checking for a pid file. And (a) seems unlikely.
>
> So I found the original httpd.conf file under /etc/httpd, and checked
> for a PidFile directive:
>
> PidFile "/private/var/run/httpd.pid"
Good stuff! Noted for future use.
--
W. Oates
Yes, there is that. But I think what the OP wants (if not, certainly
what *I* would prefer myself) is to add mySQL to the list of services
in the Sharing panel.
--
JR