Bug 19126 - better support for ACTUAL web serving
better support for ACTUAL web serving
Product: Red Hat Linux
Classification: Retired
Component: apache (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Dale Lovelace
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2000-10-15 01:08 EDT by Pierre Phaneuf
Modified: 2007-04-18 12:29 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-02-06 13:16:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Improved configurability of Apache (611 bytes, patch)
2000-10-15 01:42 EDT, Pierre Phaneuf
no flags Details | Diff
Patch separating httpd.conf into a generic config and a site-specific config (32.08 KB, patch)
2001-02-06 13:13 EST, Pierre Phaneuf
no flags Details | Diff

  None (edit)
Description Pierre Phaneuf 2000-10-15 01:08:17 EDT
One of the problems I find while setting up a Red Hat web server is that it
is hard to build a server while respecting the environment the packages
sets up for you.

For example, I want to put all my web server files under /var/www and keep
them under CVS control. Now go in, remove apache-manual, upgrade to a new
Red Hat version and see what is left of your web site.

I think that the whole server should be under a single directory, and that
the /etc/rc.d/init.d/httpd script should look at a configuration file (like
/etc/sysconfig/httpd) to know where to boot up. The configuration normally
included by the Red Hat packages could be put in a separate package (all
under /var/www/redhat for example).

The /etc/sysconfig/httpd file could have variables for a number of options

This is just a single idea to resolve that problem, the point being that I
would like to be able to upgrade Red Hat systems and put up a copy of my
web server on another machine quickly and easily (get the /var/www/myserver
directory, change the sysconfig file and off we go!).
Comment 1 Pierre Phaneuf 2000-10-15 01:42:31 EDT
Created attachment 4168 [details]
Improved configurability of Apache
Comment 2 Pierre Phaneuf 2000-10-15 01:47:46 EDT
That patch let you install an Apache server root somewhere and start it up,
without affecting the basic installation.

I know, I could make /etc/httpd/conf/httpd.conf a link to my configuration,
which could have a ServerRoot in it, but here are two advantages to my way:

 - the packaged configuration file is left untouched (ok, a backup is easy)
 - my server root stays position-independent

For example, I run my web site on multiple machines, some Red Hat 6.2, some Red
Hat 7.0, and one of them, I run from within my user home directory (it is my
test server).
Comment 3 Nalin Dahyabhai 2001-01-11 23:01:03 EST
Something very similar to this (/etc/sysconfig/apache) is being added to the
apache-1.3.14-7 package.  Thanks!
Comment 4 Pierre Phaneuf 2001-02-06 12:40:03 EST
Nice, thank you!

Working more on this, I found other places where my configuration "rubs" with
the Red Hat one. I digged out some more, and found out that since Apache 1.3.13,
if you "Include" a directory in the httpd.conf file, Apache will read every
files in there in a recursive manner.

Following this, you could have a /etc/httpd/conf.d in a manner similar to
/etc/xinetd.d, and put more specific configuration in there.

There would need to split the current httpd.conf file in two parts, one that is
generic and is to be leveraged by just about any configurations (setting up
LockFile, PidFile, User, modules, MIME types and so on) should be kept in
httpd.conf, and more site-specific configuration (mostly all <Directory> and
<Location> directives, virtual hosts, e-mail addresses and binding for example
(maybe others)) should be kept in a file in /etc/httpd/conf.d

I would suggest actually putting the default Red Hat setup in something like
/etc/httpd/conf/default.conf which would then be symlinked from
/etc/httpd/conf.d (in a manner similar to the init.d directory vs. the rcX.d

The directives in httpd.conf would be overridable in a site-specific
configuration file, since they would be pulled in afterward. Since I wouldn't
meddle with the RPM-packaged files, they would upgrade nicely and clealy.

If I wanted to disable Red Hat's configuration completely, I would simply remove
the symlink in /etc/httpd/conf.d and everything would be gone.

I will work on this a bit and propose a patch.
Comment 5 Pierre Phaneuf 2001-02-06 13:13:39 EST
Created attachment 9140 [details]
Patch separating httpd.conf into a generic config and a site-specific config
Comment 6 Pierre Phaneuf 2001-02-06 13:16:50 EST
The previous patch separates httpd.conf into two files. You should also create a
/etc/httpd/conf.d directory, and optionally make a symlink in that directory
pointing to the new /etc/httpd/conf/default.conf file (this will result in
having the same configuration as out-of-the-box).

A question: does this has any chance of getting into Red Hat Linux 7.1 (if
accepted, of course!)?
Comment 7 Nalin Dahyabhai 2001-02-16 12:32:11 EST
Not at this time.  We're in bug-fix mode for the next release, and I'd rather
not churn the web server configuration files (I'd have to touch all of the
module packages, too) at this stage.  Marking as deferred, because we will be
going there, probably for the next release after the one which Fisher is the
beta for.


Note You need to log in before you can comment on or make changes to this bug.