# HOWTO: Downgrade from apache2 to apache 1.3.x

## afabbro

WTF?  I had a server running Apache 2.0.48.  I have a new project that will use HTML::Mason.  Unfortunately, Mason requires mod_perl and doesn't support mod_perl 1.9.x until 2.0 is released.  It can be hacked together, but it's not 100%.  See the MasonHQ page for more info: http://www.masonhq.com/?FAQ:Installation#h-can_i_use_mason_with_mod_perl_1_99_x_

So...I decided to down-rev to 1.3.x.  Here's the HOWTO:

Step 0: Make a backup!  Always make a backup!  OK, don't say I didn't warn you.

Step 1 Stop Apache2.  /etc/init.d/apache2 stop

Step 2 edit /etc/make.conf and add -apache2

Step 3 Remove the old packages.  The tricky part is figuring out the dependencies (i.e., what depends on apache2).  qpkg -q didn't really work very well so I build a list of packages to remove based on browsing portage on the web (where you can see reverse dependencies) and looking at the pkglist.  I probably removed and installed more than is necessary, but what the hell...

```
emerge -C dev-perl/Apache-DBI

emerge -C dev-php/mod_php

emerge -C net-www/squid

emerge -C net-mail/squirrelmail

emerge -C net-www/apache
```

Step 4  Remove apache2 from your world favorites (/var/cache/edb/world)

Step 5 Make out apache2

```
echo ">=net-www/apache-2" >> /etc/portage/package.mask
```

Step 6 Apache 1.3.29 doesn't emerge properly without an earlier version of Berkeley db.  You may already have it, but if not...

```
emerge =db-4.0.14-r3
```

Step 7 emerge apache

Step 8 emerge other stuff:

```
emerge mod_perl dev-php/mod_php dev-perl/Apache-DBI net-www/squid net-mail/squirrelmail HTML-Mason
```

Step 9 emerge mod_ssl - it's separate in 1.3.x

Step 10 Run the ebuild configs:

```

ebuild /var/db/pkg/net-www/mod_ssl-2.8.16/mod_ssl-2.8.16.ebuild config

ebuild /var/db/pkg/dev-perl/mod_perl-1.27-r4/mod_perl-1.27-r4.ebuild config

ebuild /var/db/pkg/dev-php/mod_php-4.3.4-r4/mod_php-4.3.4-r4.ebuild config

```

Step 10 modify /etc/conf.d/apache as needed (-D PERL -D SSL -D PHP4 etc.)

Step 11 modify your /etc/apache files as needed

Step 12 start apache.  You should see in /var/log/apache/error_log:

```
[Fri Mar 19 14:22:36 2004] [notice] Apache/1.3.29 (Unix)  (Gentoo/Linux) mod_perl/1.27 PHP/4.3.4 mod_ssl/2.8.16 OpenSSL/0.9.7d configured -- resuming normal operations
```

Step 13 Cleanup apache2 stuff.  I ran updatedb & locate -i apache2.  There was apache2 stuff leftover in lots of places that I cleaned out to keep things tidy:

```

/etc/apache2

/etc/init.d/apache2

/var/log/apache2

/var/cache/apache2

/etc/php

```

----------

## milkman4

Top marks on the guide, helped me no end.  Thanks!

----------

## nevynxxx

Step 5 should really be Mask out apache not make out apache!

----------

## slusk-

Good guide, thanks!

----------

## gcasillo

It's really tragic how Apache has splintered between 1.3 and 2.0. The fascist in me wants to smack all the module developers into supporting 2.0, but the realist in me knows this isn't that simple. Sigh.

Yeah, 1.3 is okay, but I just wish we'd all get on board with 2.0 and move on. Supporting and maintain the two different versions just plain sucks.

----------

