# Documentation regarding changes to Apache by Gentoo??

## carlos123

I was reading in Apache week that Gentoo has put some custom patches into the Apache server.  I was also reading on this forum that Gentoo also has split the normal http.conf file into two and placed them into the /etc/ directory (like /etc/apache/conf/apache.conf).  

Is there some one link or piece of documentation somewhere that would tell me what changes Gentoo has made to Apache so that I don't end up posting a whole new flurry of questions about where things are at and how to get it working under Gentoo??

I have used Apache quite a bit so I should have no problem setting it up once I know where everything is at.  

Thanks. 

Carlos

----------

## kashani

I was a little unhappy when I first ran into this, but after I looked around a bit it grew on me and now prefer it over the usual mess.

/etc/apache/conf/apache.conf

       The master file, not called httpd.conf

/etc/conf.d/apache

       Used to specify which modules to load, bonus points for whoever decided that -D was much better than -DHAVE

Everything else can be figured out from apache.conf. It does an include to all the other conf files such as commonapache.conf, ssl.conf, or other conf files for modules.

About the only apache compile time option I know of is setting the hard server limit to 512 rather than the usual 256. There may be more, but that's the most obvious.

kashani

----------

## carlos123

Thanks kashini.  I appreciate your help.  I don't like having the http.conf file split into two but I guess I'll give it some time and see if it grows on me too.  It just adds an extra config file to keep track of in addition to all the other ones.  I am assuming there was a darn good reason for doing that  :Smile: .  

Apache week had mainly been talking about changes to the source code of Apache made by various distributors (including Gentoo) and the problem they were having getting questions about changes that the Apache Foundation hadn't even made.  

Short of reading the source code is there some document somewhere that would detail the changes made to the source by Gentoo?  Apache Week mentioned some changes to the ABI by Gentoo but they didn't go into much detail.  

Thanks.  

Carlos

----------

## vericgar

Looking through the .diff that gentoo applies to the apache source, It doesn't look like they've changed much:

1) added a serverroot compilation option - I assume so it could compile in the sandbox that gentoo puts ebuilds in

2) Made apache prefer per-request configuration over per-directory configuration (not sure exactly what this means...)

3) Tweaked some error messages to make them make more sense (i.e. some errors renamed to warnings and vice versa)

4) suexec compatibility patces with HTTPS/SSL

5) configuration file differences

6) changes /usr/local/bin/perl to /usr/bin/perl in the example CGIs

7) in many places changed items similiar to if (tn) to if (strlen(tn))   (I'm not a C/C++ programmer, but I assume this has something to do with buffer overflows? or maybe this is something required for compatibility with gcc 3.2 instead of gcc 2.95?)

 :Cool:  another patch that I dont quite understand how it works that looks like it has something to do with escaping quotes on suexec items.

So basicly nothing major that effects how the server works. Not really anything extra that can be configured.

----------

## carlos123

Thanks for the input vericgar.  

The problem is that any one of those "minor" changes may stump me for several hours trying to figure out why Apache is not working as described on the Apache site.  So though they may not be major, major changes they will seem that way to me when I get stuck trying to figure out what is going on.  

If it wasn't for Apache Week I wouldn't have even known that Gentoo had changed anything at all which would have made the situation even worse in terms of experiencing frustration and needing to take time to figure it out.  

It would be nice if the Apache ebuild left a message on the screen after an emerge such that there are some changes made and giving a URL where more details could be found.  My emerge of Apache left nothing of the sort.  It didn't even tell me that the http.conf file had been split in two and placed in a directory other than where Apache normally places it.  

Thank goodness for this forum but this also brings up a pet peeve of mine about the need for better and more adequate documentation.  It never ceases to amaze me how many holes in the documentation are there and how much time one must spend going about uncovering things.  It's almost as if the experience of searching for something is considered so worthwhile that little is done to explain things adequately.  As though it was akin to the joy of participating in an easter egg hunt and experiencing the thrill of finding an egg.  

More probably it is a case of Gentooites getting to the point of knowing their way around and forgetting what it was like to come to Gentoo for the first time.  

Oh well, forgive my digression into a better documentation rant.  I just have to make do with whatever yummy tid bits of info I can gather from here or there for now. 

What is this .diff thing?  Is it a file that I can look at somewhere?

Thanks again.  

Carlos

----------

## kashani

I hate to nit pick, but name a distro where this isn't the case?   :Very Happy:  Even worse, name a distro where this isn't the case in the kernel!

Personally my Gentoo Apache is much better behaved than my Redhat, Suse, or Mandrake ever were. I usually ended up building my own Apache on any of those in order to get everything I needed working properly. With Gentoo I can get fairly close to that without having to remember which 5 line ./configure directives I used last time.

Yes there is a little funkiness in /etc/apache, but it does keep in line with the rest of Gentoo's philosophy and as vericgar pointed out the changes to source are fairly cosmetic. 

I am curious to find out if you've actually run into problems with Gentoo patches to Apache or if it's just your world view has been shaken by the fact that distro's as a whole tend to eschew vanilla sources  :Very Happy: 

I am teasing you in a hopefully fun light hearted way on that last line, so don't take it too serious. And yes I have been bitten by some Gentoo things, but not their minor tweaks to code... yet. 

kashani

----------

## splooge

The emerge of apache does mention it's applying the gentoo-diff file.  It even downloads the diff file seperately, and applies the patch during the emerge process, just like any other gentoo ebuild that applies patches.

You should have seen wget getting the file, and the line that says * Applying apache-1.3.27-gentoo.diff.bz2.

Straight from the apache ebuild: 

SRC_URI="http://httpd.apache.org/dist/httpd/apache_${PV}.tar.gz

mirror://gentoo/${P}-gentoo.diff.bz2

ftp://ftp.modssl.org/source/mod_ssl-${mod_ssl_ver}.tar.gz"

then, during the unpack process, again, straight from the ebuild:

src_unpack() {

        local myssl

        unpack ${A} || die

        cd ${S} || die

    **    bzip2 -dc ${DISTDIR}/${P}-gentoo.diff.bz2 | patch -p1 || die  **

Seems pretty well documented to me =)

----------

## carlos123

To be sure the holes in documentation is not Gentoo specific.  Your right about that Kashani.  It seems to be more Linux specific.  

As much as I appreciate Linux (and I most certainly do) I suppose part of the problem is that open source developers have little motivation (it seems) to pump out outstanding documentation.  And to keep it maintained.  

In the world of propriatery software, excellent documentation is absolutely crucial to the success of a software product.  Poor documentation or that which is difficult to follow due to holes in it results in a program not being as successful as it could be.  And since companies want to be successful and make money they work on their documentation.  

Now I am not saying that there are not propriatery software products with documentation that is less than excellent.  Not at all.  There's plenty of that.  Only that propriatery software makers have more incentive to make outstanding documentation.  

Open source developers are more motivated to make a great product.  Either because it's something that interests them personally, for their own use or to use the product for their own business.  More motivated to make a great product than produce great documentation as a vehicle for greater product success.  

I haven't run into any specific problems yet Kashani.  If I do I will most certainly start a thread on it  :Smile: .  

As for my world view...in terms of Linux it's still developing  :Smile: .  Up until a week ago I hardly even knew or considered the fact that distro's ALL eschewed vanilla sources.  

I have a confession to make.  I am only about 30-45 days into Linux  :Smile: .  Having previously only used Windows Apache on my local computer and Linux Apache only through a tiny shell window at my web host.

Thanks too splooge for your thoughts.  I hadn't realized that the gibberish appearing on my screen was expressing what you say it was  :Smile: .  I still believe the interests of Gentoo would be better served by having a more English like explanation appear at the end of the emerge but perhaps I'll think differently down the road some.  Not to mention that I usually do an emerge in one terminal window while doing other things so I wouldn't have seen stuff passing by on my screen anyway. 

I'm off to find that .diff file  :Smile: .  

Carlos

----------

## kashani

While the tech content is fairly low in this I do think it's pretty good discussion. 

The thing to keep in mind is:

1. Most patches, diffs, mods, etc are to enhance functionality. Usually not to change it. 

Most of the time. Using the car anology, adding a bigger fuel tank is okay, removing the steering wheel is not. Generally you're pretty safe.

2. Vanilla sources has some real crap in there.

Do I really need all the fun bits of code in Apache that are included to deal with Solaris, SCO, or HPUX? Probably not. Can the Apache foundation afford to take them out? Probably not. Can my distro give me a slightly better product by customizing it to my needs? Hopefully. This is most likely a gross exageration, but generally it's your distro's point of view.

3. Docs will always suck.

I've been dealing with Real's Helix server for the past month. Now THERE is a misdocumented peice of crap. On the other hand I was bit by Postfix docs last week after the author's docs, several webpages, and a book told me the wrong thing. I have a hard time thinking of any software where the manufactuer has provided complete instructions for all functions. THe rulle is probably "The more the software does the less is documented" I do tend to look for mature projects with a book or two written about them.

4. Software is always an adventure

Yeah Linux does still have some rough spots. On the other hand it does have a ton of flexibility. I think most people are willing to take the latter over the former... as long as the majority of things work as advertised.

Do yourself a favor and as a new user DO NOT rsync and emerge -u world everyday.  :Very Happy: 

5. There's always the forum

There's some good people on here and have gotten answers to most of my questions within a day or so.

Good luck.

kashani

----------

## carlos123

You know you may be right about there being very few applications (commercial or Linux) with outstanding documentation Kashani now that I think about it.  Redhat's is actually the one exception that I can think of.  Their online docs are very, very good!  

I guess that's where I smell a market with lots of room for growth  :Smile: .  I figure if people can make money writing books that make up for any shortfall in documentation I can do the same creating subscription web sites that make it much easier to do things (for a price of course  :Smile: ).  

At least that is a long term goal of mine.  

To create almost self-sustaining, outstanding documentation subscription sites that make it a whole lot easier for people to create their own online business, install Gentoo, or any other such thing.  While I go off lounging on a beach somewhere in the caribbean sipping my cola and checking my email every once in a while through my satellite connected lap top.  Oh yeah!  :Smile: !

Of course as you undoubtedly know one's favorite version of reality is not always that easy to bring into being.  

My adventure into Linux (and it's been an adventure so far) has turned my Windows world upside down!  I can no longer recommend Windows as the best development platform for web projects.  

Not with Apache, perl, php, ssh, and all the other native goodies that are available under Linux.  Applications that I had to piece together with Windows duct tape to keep working under Windows 9x versions.  With about 2 or 3 reboots every day.  More if I was intensily using them.  

Oh the applications were good.  Nothing wrong with them but the underlying instability of Windows kept getting in the way!  I got so fed up with it about a month ago when my Windows 98 finally couldn't take the load I was placing on it, that I finally tried once again to install Linux Mandrake 7.1.  

About a year and a half ago I had literally tried installing it about 30 times before quitting.  

This time I succeeded getting around some pesky geometry errors!  

Talk about ugly!!  I almost gave up again.  Then I installed Redhat and thought I was in heaven.  Until I tried to RPM stuff.  I then tried FreeBSD and hit my first taste of real *nix gibberish and absolutely exhaustive documentation.  So much so that finding the one command I needed was an exercise in patient reading through wads of gibberish I didn't understand.  Not to mention that my mouse never worked.  

And then I found Gentoo!!  Boy did I ever see faults in the documentation (and still do) but this forum has been FANTASTIC!!  It has become for me a living document.  That I can interact with to find what I need.  

And my Gentoo is finally beginning to look like a usable system.  I am almost ready to change the default login that Grub presents me with from Redhat to Gentoo!

Now what was it that I started this thread on...??? Oh yeah...Apache  :Smile: .  

Carlos

----------

