OT:Apache question

Mark Knecht mknecht at controlnet.com
Fri Feb 20 23:39:25 UTC 2004


Rick Stevens wrote:

> Did you hit http://www.knechthome.com/files?  That's how the alias
> works.

Rick,
    Thanks for the info. you're truly generous! I may miss you this 
afternoon so I'm just zipping this off to say thanks. I haven't tried 
everything you suggested yet.

    I'm not sure what I hit. When I'm actually at home, sitting on that 
machine and I try to do this it tells me something like:

http://localhost.knechthome.com/files doesn't exist. (

This is paraphrased a bit.)

when I'm here at work and I ask for http://marksmusic.myvnc.com/files it 
(I think my local copy of Mozilla) ends up telling me it cannot find 
Wizard.knechthome.com. No way it should find it since it's just a 
machine running Apache behind a remote firewall at my house, but the 
question I have is why do Apache tell it to look for 
Wizard.knechthome.com at all? Why doesn't it continue to look for 
marksmusic,myvnc.com and then ask for the directory called files?

This is what I need to study this weekend.

<SNIP>
>> The second has an apache2.conf file in which I placed your edits at 
>> the end:

Tried moving it but no change yet.

> 
> 
> Oops!  No, those have to be either before the first "<VirtualHost>
> </VirtualHost>" clause (to make it server-wide, if you have more than
> one VirtualHost) or inside the clause (to make it active for JUST this
> VirtualHost).  For example:

Great example! I'm going to study that tonight and see if I can make 
sense of how to put it into my files. The one complication I see is that 
  the config files are loading other config files, like apache2.conf 
including commonapache2.conf, so I guess my stuff needs to be before 
those includes?


> 
> VIRTUAL HOST-SPECIFIC:
>     <VirtualHost www.knechthome.com>    (or <VirtualHost *>)
>         Alias /files "/mnt/data/sessions"

I want to be clear about this point above - the <VirtualHost *> comment 
above - does this exist by default and then automatically use the name I 
place in my hosts file??? If it did it could account for why I'm seeing 
some of this stuff. Something like knechthome.com is in hosts, so a 
VitualHost gets set up, but then Apache tries to 'resolve' 
knechthome.com through DNS and cannot, so it bbombs out saying it cannot 
find it?

Maybe I'm making it more complicated than it really is.

> 
> I think you'll find that moving your set up will stop that from 
> happening.  Remember that "Alias" sets up a quasi-symlink (like doing
> an "ln -s") to something that's not in your "DocumentRoot" directory
> tree.  The "<Directory>" stuff actually controls the access to the
> alias' destination (like "chmod" would to the destination of a symlink).

I hope so, but not yet. Still, I have some serious studying to do I think...

Also, looking at the commonapache2.conf file it appear I can run a 
virtual host by possibly having a 'public_html' directory in either my 
account or a special account I make for only doing Apache?

> 
> You still must make sure that Apache can read the directory by doing
> the chmod stuff.  Apache is running as "nobody" and can't override
> filesystem permissions.

Yes, I get that intellectually, now lets see if I can put it into practice.

Thanks much and have a good weekend.

- Mark





More information about the Redhat-install-list mailing list