[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: virtual hosting in apache and file locations



On Tue, Oct 02, 2001 at 10:27:49AM +0200, martin f krafft wrote:
> i always wondered just why debian apache puts the main homepage of a
> server into /var/www. /var isn't made for stuff that's persistens like
> a homepage! in addition, where do virtual hosts go? in general, once
> a virtual host is defined, one had better defined a virtual host for
> the primary hostname too so as to make apache work better (my
> experience). but as soon as server.mydomain.com and
> virtual.mydomain.com are both hosted by the same server, and are both
> virtual domains, they should technically be in the same hierarchy.
> 

http://www.pathname.com/fhs/pub/fhs-2.2.txt.gz:


"5.  The /var Hierarchy

       5.1  Purpose

       /var contains variable data files.  This includes spool directories and
       files, administrative and logging data, and transient and temporary
       files.

[...]

       /var is specified here in order to make it possible to mount /usr read-
       only.  Everything that once went into /usr that is written to during
       system operation (as opposed to installation and software maintenance)
       must be in /var."

I think html files can be defined as variable data files. /var includes
"transient and temporary" files.  However, I don't think this means
everything in /var is non-peristent. 

As far is I know SuSE and Solaris store apache data files in /usr/local.
Which makes also sense, as /usr can contain static and dynamic files.

An argument for using /home is the fact that www-data is a user and as
such it should have its home dir in /home.

Still, from a gut feeling, I prefer /var to /home.  Maybe we could
research in more depth the reasons why /var was chosen before we decide
on changing it?

> right now, i solve this by having symlinks from /var/www/servername to
> the homedirectory of the responsible person for the domain, so that
> the actual data reside on /home. but that's not the way debian handles
> this, and i am wondering just why?
> 
> why is debian apache making /var/www be the main directory, and why is
> debian apache not providing an easily extensible location for virtual
> domain data?
> 
> martin;              (greetings from the heart of the sun.)
>   \____ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
> -- 
> it said "needs windoze 98 or better," so i installed linux.



-- 

GPG Keyid 0x0FCD0EE2
GPG Fingerprint C2FF 6147 0ADB 1674 4096  2339 370F CBDF 0FCD 0EE2

fortune - print a random, hopefully interesting, adage:

Christmas time is here, by Golly;	Kill the turkeys, ducks and chickens;
Disapproval would be folly;		Mix the punch, drag out the Dickens;
Deck the halls with hunks of holly;	Even though the prospect sickens,
Fill the cup and don't say when...	Brother, here we go again.

On Christmas day, you can't get sore;	Relations sparing no expense'll,
Your fellow man you must adore;		Send some useless old utensil,
There's time to rob him all the more,	Or a matching pen and pencil,
The other three hundred and sixty-four!	Just the thing I need... how nice.

It doesn't matter how sincere		Hark The Herald-Tribune sings,
It is, nor how heartfelt the spirit;	Advertising wondrous things.
Sentiment will not endear it;		God Rest Ye Merry Merchants,
What's important is... the price.	May you make the Yuletide pay.
					Angels We Have Heard On High,
Let the raucous sleighbells jingle;	Tell us to go out and buy.
Hail our dear old friend, Kris Kringle,	Sooooo...
Driving his reindeer across the sky,
Don't stand underneath when they fly by!
		-- Tom Lehrer

Attachment: pgpJjD5NEQkeQ.pgp
Description: PGP signature


Reply to: