> Hi,
>
> I am confused and want to clear things up; what exactly is personal
> about apples "personal web sharing"?
What's personal is that it runs on your personal computer, that's all.
> Is it just about adjusting the servers config to
> allow ~ access to my home dir?
The default httpd.conf does that, but that's not unusual.
> It appears to stop and start the server. Without
> "personal web sharing" ticked I have no web server
> at all?
Yes, that's correct for Mac OS X as installed. You can of course change
this if you like.
> All this is because I am trying to switch to Apache2. Using the
> following plist file. I am trying to arrange for Apache2 to launch at
> system startup, rather than apples Apache1. However I cant get server
> to start at all when doing things apples way. Where is the plist file
> for apache1?
There is none-- Apple is still using the older pre-launchd system for
Apache. The startup/shutdown script is at
/System/Library/StartupItems/Apache/Apache.
You could use this script as a reference for an Apache 2 script, if you
want to stick with the pre-launchd approach. However the Apache 1.3
script isn't much use for setting up a launchd.plist, because the
requirements are different.
> The server starts and runs fine when started using "sudo
> /usr/local/apache2/bin/apachectl start". But I want to try and avoid
> adding things to /etc/rc
>
> fergus:more /System/Library/LaunchDaemons/apache2.plist
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE plist PUBLIC "-//Appl.......rtyList-1.0.dtd">
> <plist version="cp1.0">
> <dict>
> <key>Disabled</key><true/>
Again disabled? This line means just what it sounds like it means.
> <key>Label</key><string>com.apache.apache2</string>
> <key>OnDemand</key><false/>
> <key>ProgramArguments</key>
> <array>
> <string>/usr/local/apache2/bin/apachectl</string>
> </array>
This is a problem-- the same one as in your Tomcat post. Actually it's
a couple of different problems, although as you'll see one is less
important.
The real problem is that if you run apachectl at the command line, it
forks and returns, so you get your command prompt back. Launchd doesn't
work that way. You need to point to the actual httpd binary here. For
Apache 1.3 you'd put /usr/sbin/httpd here. For you it's probably
something like /usr/local/apache2/bin/httpd, but you'll need to check on
that.
The second problem is the lack of arguments. You're telling launchd to
run apachectl here, but you're not telling apachectl whether to start,
stop, or whatever.
You probably need to address this even after fixing the first problem--
you may need to pass some arguments to httpd to get it to start up
normally. I don't know what those are, but you can find them out by
inspecting the Apache 2 version of apachectl to see what it's doing.
--
Tom "Tom" Harrington
Macaroni, Automated System Maintenance for Mac OS X.
Version 2.0: Delocalize, Repair Permissions, lots more.
See http://www.atomicbird.com/
<snip>
You built Apache 2 from source? Or did you use one of the packages
which will give you a pane for System Preferences to launch Apache 2?
(e.g., Marc Lyonage's package).
http://www.serverlogistics.com/apache2.php
In either case you have to NOT have the standard Apache 1 included by
Apple running for Apache 2 to start. So uncheck Personal Sharing (which
launches the Apple-installed Apache 1). See the documentation about
this.
Hope this helps!
Tom Harrington <t...@pcisys.no.spam.dammit.net> wrote:
> > I am confused and want to clear things up; what exactly is personal
> > about apples "personal web sharing"?
>
> What's personal is that it runs on your personal computer, that's all.
>
> > Is it just about adjusting the servers config to
> > allow ~ access to my home dir?
>
> The default httpd.conf does that, but that's not unusual.
>
> > It appears to stop and start the server. Without
> > "personal web sharing" ticked I have no web server
> > at all?
>
> Yes, that's correct for Mac OS X as installed. You can of course change
> this if you like.
So, any user can start/stop the web server for all users.
Can this be used with a server built from scratch?
> In either case you have to NOT have the standard Apache 1 included by
> Apple running for Apache 2 to start. So uncheck Personal Sharing (which
> launches the Apple-installed Apache 1). See the documentation about
> this.
Yep; figured that out.
Thanks.