Operating System - Linux
1752569 Members
5237 Online
108788 Solutions
New Discussion юеВ

Re: Guide to converting Apache 1.3 to 2.0

 
Steven E. Protter
Exalted Contributor

Guide to converting Apache 1.3 to 2.0

I was forced due to a blunder to convert a highly customized Apache 1.3 httpd.conf file to 2.0. I kind of sort of accidently let Red Hat Linux 9.0 upgrade the Application Apache on my backup PC based web server.

This is not a point handing thread, though I don't rule it out if someone says something really innovate. This is informational so those that search itrc for answers will find this one.

If you let it(I did doh!) the Upgrade for Red
Hat Linux from 7.3 to 9.0 will do a few things that you might not like.

1) If you use the Washington University ftp server wu-ftpd, the upgrade will install vs-ftp unless you choose the option to choose which applications to upgrade. In that case I'm not sure if you can prevent the upgrade, but it seems likely. Any customization, GONE.

2) The upgrade DOES not convert your httpd.conf file from 1.3 to a usable format. It leaves it alone and simply doesn't start the httpd server after the upgrade.

There is a document that says how to do the migration, but if you've done a lot of customization it doesn't help too much.

Example

ServerName investmenttool.com

becomes

ServerName investmenttool.com:80

Why they couldn't figure that out and make the change escapes me.

If you try and go through the migration document and make all the changes, unless you took really good notes, and are lucky you won't get all the changes.

On apache when you try service apache start
You get an error saying there are Apache 1.3 directives in httpd.conf no line number and a reference to an incomplete migration document.

So, here is how I did it in less than 15 minutes.

A lot of my changes were Virtual hosts to accomodate my various web hosting customers. I took these directives, put them in a seperate file. There were other customizations to let index.shtml be a main page and to let cgi scripts run.

I went back to a Apache 1.3 server and did thus:

cd /etc/httpd/conf

diff httpd.conf httpd.conf.original | more

I went through these changes and in another window made the changes one at a time in the stock httpd.conf file that came with Apache 2.0

With each change I saved and ran:

sevrice httpd restart

If it started, I went on to the next change. If one of my changes caused a no-start I knew which change it was and looked at the migration document.

Once done, I did this on the 2.0 sever.

cat httpd.conf.virt >> httpd.conf

The first file were the Virtual Host calls for my web hosting customers. The migration.html document noted there were no changes in those directives and sure enough after that concatenation, the server started, and ran correctly.

I am sure there are better ways to do this, and this document was generated by my own stupidity creating a necessity. The bottom line though is that I believe this methodology can help.

Therefore I'm sharing it.

Note: HP has stopped support on Apache 1.3 as of July 1, 2003. This is somewhat hypocritical, because when itrc failed last night, the error message clearly showed they were using Apache 1.3 for Unix.

The error message is available upon request.

SEP

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
13 REPLIES 13
Stuart Browne
Honored Contributor

Re: Guide to converting Apache 1.3 to 2.0

Steve,

What you might fnid useful is the 'Include' directive. RH8+ (out of the box) comes with the directive:

Include conf.d/*.conf

You could make use of this feature for your VirtualHosts's to keep them separate, and distinct, so as not to have one-big-ugly configuration file.

Add an entry to /etc/httpd/conf/httpd.conf like:

Include VirtHost/*.conf

And create:

/etc/httpd/VirtHost/client1.conf
/etc/httpd/VirtHost/client2.conf
/etc/httpd/VirtHost/client3.conf

...

RH employ this ability to load different modules (there will be an /etc/http/conf.d/php.conf, and probably an 'ssl.conf', 'perl.conf', and a 'pyton.conf', if you've installed those various modules).

Just makes for easier management in my opinion.
One long-haired git at your service...
Steven E. Protter
Exalted Contributor

Re: Guide to converting Apache 1.3 to 2.0

Definitely a good suggestion Stuart.

Since Virtual hosts are at the bottom of httpd.conf, I'm torn on that issue.

This server is the backup.

I'm going to be getting a HP-UX box on standby also apache 2.0, preparing for the great upgrade on my production Red Hat 7.3 Linux Server.

For some dumb reason, Dell put both drives on the same controller cable and I missed it. It seems to have made the kernel unupgradeable due to the fact that I'm doing Raid 1 mirroring.

So, when the backup boxes are ready, the Dell goes offline, the box gets taken apart, and a cold install gets done. Going to preserver BIND, cron and some other configurations, because they work just fine.

Sendmail just got tweaked, finally does everything I like except require DNS resolution prior to accepting smtp mail and worries me.

I just ran a test and do have a problem there.

I'm looking at first weekend in August or Last for that upgrade.

SEP


Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Stuart Browne
Honored Contributor

Re: Guide to converting Apache 1.3 to 2.0

Much fun..

I made the above suggestion as I have a friend who runs an ISP. After the first 100 or so Virtual Web Servers on the box, it starts getting confusing as to what is where.

It's his box though, not mine. He didn't ask me to write any of the routines to add/maintain those VWS entries.. ;)

As for the sendmail thing, I take it you've got "FEATURE('accept_unresolovable_domains`)" removed from your MC? RH puts it in by default.

One long-haired git at your service...
Steven E. Protter
Exalted Contributor

Re: Guide to converting Apache 1.3 to 2.0

I set my self up for some trouble by having a cron job that takes sendmail.mc from the 7.3 box to the 9.0 box via cron every night.

I've been playing with this on and off since your first message. I've gotten some of the bugs out of sendmail but right now sendmail can't get any email off the box.

Of course I did have to go outside and mix concrete to make some sidewalk repairs. The joys of summer.

Not a production crisis, because its the backup box and I care much more that it serves up the web pages.

I'm going to have to do the same thing to sendmail.mc I did to httpd.conf

Start with the original sendmail.mc generate the databases(that script/feature still works) and keep adding features until the wretched thing works the way it did under 7.3 (quite nicely).

I wish I had your friends problem. I've been at this a year and am hanging near break even. Uptime is well over 99% though, so the business is trickling in.

http://www.isnamerica.com/hosting.shtml

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Stuart Browne
Honored Contributor

Re: Guide to converting Apache 1.3 to 2.0

He's been at it since '95. Started as a 'net cafe (god I hate the smell of coffee!), then moved to ISP dial-up's, closed the cafe a few years later, and is now a dedicated ISP.

I worked for him for about 4 years before coming here. It's where I started learing/using Linux day-in/day-out.

0pts pls.
One long-haired git at your service...
Steven E. Protter
Exalted Contributor

Re: Guide to converting Apache 1.3 to 2.0

Good to know Stuart. I'm going to keep at it until it shows some good cash flow.

I just came across an itrc post in HP-UX with my error message from sendmail.cf

I can probably get the sendmail working again and then go through the development process for creating my setup.

I'll take my time. My 7.3 box works perfectly and I won't do the upgrade until I have everythign working the way I want it too.

Regard Stuart.
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jerome Henry
Honored Contributor

Re: Guide to converting Apache 1.3 to 2.0

Hey Steven,

You seem to have many tips and tricks of that kind (I'm thinking about ssh tips on one of las week's posts).
Why not put all this online ? I feel it would be useful for many of us, and easier to collect than browsing the forums... What do you think ?

J
You can lean only on what resists you...
Steven E. Protter
Exalted Contributor

Re: Guide to converting Apache 1.3 to 2.0

Well Jerome,

Your suggestion is why I wrote the post.

Are you suggessting I set aside some web space or something and post up some doc's?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Balaji N
Honored Contributor

Re: Guide to converting Apache 1.3 to 2.0

SEP,
guess what Jerome must have mentioned is the second. put up a website. so everyone can quote links from there.

may be we could even setup a wiki so that if some extra comments need to be added, can be done.

am i seeing any space providing sponsers here?
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.