Subject: AppleDouble & apache

From: Ken Gillett <[email-masked]>
Date: Fri, 15 Feb 2002 15:24:27 +0000

I have a shared folder that I want to specify as containing 
configuration files to be included as part of apache's configuration. 
The trouble is that apache parses the .AppleDouble folder and 
everything in it and none of it makes any sense in terms of apache, 
so understandably it fails to start. I have found that if I ensure it 
is empty and not writable by the user who has it mounted (so nothing 
can be saved in there) then apache is happy with that empty folder.

But, I cannot edit these files on the Mac side (the whole point of 
mounting it) since BBEdit HAS to save stuff in the .AppleDouble 
folder (which it cannot do) so the save fails.

Of course it only applies to this folder which is specified as 
'Include'd in httpd.conf.

Can anyone suggest a way to allow resource data to be saved, yet 
preventing apache from trying to read it as configuration data on 
startup?
-- 

Ken  G i l l e t t

_/_/_/_/_/_/_/_/_/

---

From: "Chris Garrigues" <[email-masked]>
Date: Fri, 15 Feb 2002 10:38:51 -0600

> From:  Ken Gillett <[email-masked]>
> Date:  Fri, 15 Feb 2002 15:24:27 +0000
>

I haven't tried this, but what if you create a symbolic link from the apache 
config directory to a copy which is in an area mounted from the Mac.  
That way all apache would see is the link.  I assume apache would follow the 
link.

Chris

-- 
Chris Garrigues                 http://www.DeepEddy.Com/~cwg/
virCIO                          http://www.virCIO.Com
716 Congress, Suite 200
Austin, TX  78701		+1 512 374 0500

  My email address is an experiment in SPAM elimination.  For an
  explanation of what we're doing, see http://www.DeepEddy.Com/tms.html 

    The Greatest tragedy in mankind's entire history may be the
      hijacking of morality by religion.  However valuable -- even
      necessary -- that may have been in enforcing good behavior on
      primitive peoples, their association is now counterproductive.
      Yet at the very moment when they should be decoupled,
      sanctimonious nitwits are calling for a return to morals based
      on superstition.
				--- Arthur C. Clarke

---

From: Steve Freitas <[email-masked]>
Date: Fri, 15 Feb 2002 12:19:56 -0800

Let's see, a couple of ideas. First, I don't think BBEdit will save resource
information unless you tell it to change your filetypes to BBEdit type. So
you should be able to save without BBEdit creating an AppleDouble file, and
if you specify "noadouble" as an option for that volume in
AppleVolumes.default, that might solve the problem.

Another idea: Set up your permissions so that apache can't read inside the
.AppleDouble folder, but the user you're using to write the config files
can.

Steve

> To: Netatalk List <[email-masked]>
> Subject: AppleDouble & apache
> Resent-From: [email-masked]
> Resent-Date: Fri, 15 Feb 2002 11:12:59 -0500 (EST)
>

---

From: "Robert J. Rust" <[email-masked]>
Date: Fri, 15 Feb 2002 14:32:23 -0600

> That way all apache would see is the link.  I assume apache would follow the

Actually, I would symlink to the config files themselves rather than the
directory.  That way you could put the symlink somewhere where BBEdit had
the ability to create the file in .AppleDouble that it wants, and still
actually edit the data in the config files.  This would involve multiple
symlinks, but I think it's doable.

Robert

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Robert J Rust
Microcomputer Support Specialist
UW - River Falls IT Services
(715) 425-4357
[email-masked]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---

From: Ken Gillett <[email-masked]>
Date: Sat, 16 Feb 2002 11:10:51 +0000

At 12:19 pm -0800 15/2/02, Steve Freitas wrote:
>information unless you tell it to change your filetypes to BBEdit type.

I do really want them to be BBEdit files so I can just dbl click them 
to edit. If I can stop it writing resource data I can use an 
extension to map to BBEdit filetype so double clicking still works, 
but I couldn't see a way to stop BBEdit from wanting to store the 
resource info. I might have missed something though.

>So you should be able to save without BBEdit creating an AppleDouble file, and

I tried noadouble but the icons just dance all over the place. As 
soon as I removed that option everything's perfect again. In any case 
I only want noadouble on this folder in a share that otherwise needs 
.AppleDouble.

>.AppleDouble folder, but the user you're using to write the config files

I also thought about that, but AFAICT apache runs as root as it seems 
to be able to read the .AppleDouble directory whatever the 
permissions I give it (while still allowing BBEdit to write to it of 
course).

>symlinks, but I think it's doable.

Currently I have the real files in an area writable by BBEdit and 
then links to them in the apache config directory which has an empty 
.AppleDouble folder so it works. But it makes adding a new virtual 
host a bit more complex than simply dropping the new file into the 
appropriate folder as the new link also needs to be created. Not a 
big deal, but I'd prefer to avoid it if possible.
-- 

Ken  G i l l e t t

_/_/_/_/_/_/_/_/_/

---

From: Magnus Stenman <[email-masked]>
Date: Sat, 16 Feb 2002 15:38:44 +0100

> At 12:19 pm -0800 15/2/02, Steve Freitas wrote:
..
> big deal, but I'd prefer to avoid it if possible.

Stick something like this into your apache (re)start scripts:

VH=/path/to/apacheconfig/vhosts/
AVH=/path/to/macfiles/vhosts/
rm $VH/*
for f in $AVH/*; do ln -s "$f" $VH; done

*or*

>vhosts.conf
find $AVH -type d -o -path '*AppleDouble*' \
	-o -exec echo "include {}" >> vhost.conf \;

(include vhost.conf from httpd.conf)

/magnus

---

From: Ken Gillett <[email-masked]>
Date: Sat, 16 Feb 2002 15:59:12 +0000

>for f in $AVH/*; do ln -s "$f" $VH; done

Yes, I probably will do this, but I was hoping for some 'magic' 
option that avoided the issue entirely rather than having to work 
around it.

Thanks for the suggestion.
-- 

Ken  G i l l e t t

_/_/_/_/_/_/_/_/_/