Mailinglist Archive: opensuse (4053 mails)

< Previous Next >
Re: [SLE] Apache ServerRoot directive
On Monday 20 August 2001 18:18, David List wrote:
> I just looked through my /etc/httpd/httpd.conf file for something and found
> that the ServerRoot directive was set to "/usr/local/httpd". Shouldn't this
> be "/etc/httpd"? The server is running fine serving a single page with text
> and images.

No. /etc is for configuration. /etc/httpd is for website configuration.
/usr/local/httpd is a logical place as any to put the actual web content. I
put my logfiles under there as well, but were I a bit more intelligent I
would put them under /var/log/httpd.


> Well, SuSE's placement of Apache files don't keep configuration, error and
> log files in the same directory tree, but shouldn't this directive point to
> the tree where the configuration file (/etc/httpd/httpd.conf) is found?

There is occasionally a reason for a file to know where itself is, but this
is not one of those. It needs to know where the website files are, not the
website configuration files which it's currently reading anyway.

Your misconception is that one program should all be placed in one directory.
But that's not logical on Linux. Temporary files go in /tmp. User/site files
go in /usr, /usr/local. Configuration goes into /etc. Were the shoes on the
other foot, I'd end up looking in /etc for website configuration (because
that's where it goes) just to find out it's all bunched up into one garbled
directory tree...

It's just a matter of a frame of mind.


< Previous Next >