# apache WTF

## Hamsjael

 :Mad:   I just updated apache as i have done many times before. This time though i dont know what the hell it installed. It doesnt use any of my config files. It has installed "httpd.conf" with total bullshit defaults and refuses to start with apache2.conf when using the script in init.d

i upgraded from r9 to r31

and now nothing works. What the HELL happened??

Has anybody else seen this or is it just something with my config. I cant imagine that the layout of config files has just been reversed to something from the default apache source, but maybe im wrong   :Mad: 

----------

## Hamsjael

well okay, apparently everything has moved to httpd.conf SURPRISE!.... hrumpf

----------

## wedge14

Ummm, yea who's bright idea was this.  I liked it better the way the Apache team intended it, if anyone is taking a survey.

----------

## hjnenc

Please have a look at this: http://www.gentoo.org/doc/en/apache-upgrading.xml

----------

## wedge14

Thanks for the link.  This is all fine unill "The state of Apache and it's modules in Gentoo....begins..... becoming dismal" yet again, and we go through another round of changes.

Don't get me wrong I still like Gentoo, I just wish we could hold the config structure changes to a minnimum.  It makes a system administrator pull his hair out each time he does an update.

----------

## Hamsjael

 :Mad:   okay i am trying to migrate to the new setup. but do i *really* have to use keywords to unmask an unstable version of php to make it start using it?

Christ, this sucks... BIG time. I like gentoo and will continue to use it on the desktop, but this is another nudge towards debian on the servers for me. Its just not serious to have to wrestle for hours to upgrade someting as critical as a LAMP server   :Mad: 

----------

## jamapii

Most "new style" revisions of apache modules should be stable now (if stable revisions existed at all). The "upgrading" guide is from a time when the changes was happening in ~arch.

----------

## col

I agree that the new apache config is crap....waiste of many peoples time. Is this really neccessary ?

well took me about 30mins to get my webserver back up again....not happy.

----------

## thoughtform

after 45 minutes i've gotten my apache2 server back up but SSL isn't working. grrr.

is this correct?

from /etc/conf.d/apache2 - 

APACHE2_OPTS="-D DEFAULT_VHOST -D PHP4 -D SSL"

----------

## col

Mine is working and I have:

```

APACHE2_OPTS="-D DEFAULT_VHOST -D SSL_DEFAULT_VHOST -D PHP4 -D SSL"

```

Last edited by col on Wed Sep 21, 2005 11:44 am; edited 1 time in total

----------

## thoughtform

yes that fixed it for me. thanks

my gallery is still b0rked but that's for another day. :s

----------

## col

 *Scorpaen wrote:*   

> yes that fixed it for me. thanks
> 
> my gallery is still b0rked but that's for another day. :s

 

lol same here  :Sad:  ...my gallery is broken. I to will leave that one for another day. If you fix yours post here.

----------

## Hamsjael

Got it working on two servers the first one took about 45 minutes and the second about 30.

Only problem not obvious (appart from all the copying of custom log settings and so on and so on) was that it is neccessary to change the path to mod_ssl.so in  /etc/apache2/modules.d/41_mod_ssl.default-vhost.conf from "dont remember what it was" to:

```

<IfDefine SSL>

  <IfModule !mod_ssl.c>

    LoadModule ssl_module    extramodules/mod_ssl.so

  </IfModule>

</IfDefine>

```

This is only applicable if you copy this file from the old "conf" dir.

i have not got "-D SSL_DEFAULT_VHOST" in /etc/conf.d/apache2, but it s working anyway (haven't got any virtual hosts other then default running ssl

----------

## tlarco

What a nightmare!  I use Gentoo entirely for both business and personal Linux needs and its great until something like this happens.  The first 5 apache servers I upgraded without too much trouble.  Some little snags with SSL and vhosts, but all and all it went ok.  I saved the most important one for last.. our web hosting server.  I followed the exact same steps on all 6 servers and now I cannot pull up the index.html page, vhosts, NOTHING.  /etc/init.d/apache2 start says ok, the log has no errors and a process exists in the process table.  

netstat -a shows www listening

telnet localhost 80 connects

lynx http://localhost or http://x.x.x.x IP all just hang forever until I kill the process.  

The first and only major clue to this problem is that when I execute /etc/init.d/apache2 stop it says there is no pid file... and sure enough there is no /var/run/apache2.pid!  A find shows me there is no apache2.pid on the system.  I tried re-emerging apache and unmerging it entirely and emerging it back in.  Same problem over and over.  I am at a loss and just hating linux today (although I know its still better than the alternative).

I dont even know what to post since I have taken config files that work fine on other gentoo apache servers and they all end the same way.  I ran a revdsp-rebuild and it says there is no problems.  My apache server was working perfectly this morning before I did the upgrade.     

If anyone has any advice I would be very grateful.  I thought about unmerging, removing all the distfiles and starting over, but part of me thinks I am just going to waste more time.  TIA

Tony

----------

## Duncan Mac Leod

Really a nightmare!

Just reverted back from 1.3.33-r12 to 1.3.33-r6, cause I have no time at the moment to bother with config files  :Mad:  - would be nice if there had been a major announcement (or did I miss it?)...

----------

## tlarco

There was a memo in the newsletter-

Major package updates for Apache

--------------------------------

The Gentoo Apache Team is pleased to announce the stabilizing of package 

updates that have been in the works for over a year. Some of the major 

changes include: 

 * New configuration and configuration locations to more closely match 

upstream and reduce confusion for users coming from other distributions.  

 * Modules now use a centralized eclass that builds, installs, and 

displays standard information on enabling the module. This allows easier 

maintenance of existing modules, and allows us to more rapidly develop 

ebuilds for modules that are not yet in the tree.  

 * Expanded USE flags to let you choose which MPM is compiled.  

 * A new gentoo-webroot that will eventually provide a gentoo-themed 

icon-set, error documents, and default website. This has been put in it's 

own package, and includes a USE-flag to not install the gentoo-webroot 

into /var/www/localhost - useful if you put your own website there.  

 * And much more, including the fixing of many many bugs.  

These changes will stabilized on Sunday, September 18th. These changes 

have been throughly tested and given a thumbs up by many many users. They 

also allow you to use the new php (including support for php5) ebuilds 

when they become fully available. 

Because of these changes and improvements, when you upgrade to the new 

revision of Apache, you will need to take care of some things. These are 

fully documented in our Upgrading Apache document [1], but in summary, 

this is what you will need to do: 

 * Merge any customizations that you have made to the Apache configuration 

into the new configuration at /etc/apache2/httpd.conf (The configuration 

file location has changed). Note that the init script for apache checks 

for a configuration in the old location and refuses to start if you 

haven't moved/removed it - this is to avoid the possibility of moving to a 

configuration that isn't right for your machine.  

 * Update any modules that you used to revisions that support the new 

eclass. Older modules will not work due to location changes.  

 * Restart Apache   

We have done our best to make it easy to migrate, but if you have 

problems, feel free to visit us in #gentoo-apache on irc.freenode.net or 

on our mailing list gentoo-web-user@gentoo.org and we'll be glad to help.

----------

## col

Although I didnt take notes while I was doing this, I think this was the procedure I used:

First I move my old config Dir and then install the new apache:

```

mv /etc/apache2 /etc/apache2_old

emerge apache

```

then I edited the new http.conf and php.ini (only a few lines in these files were changed)

copied over my ssl stuff:

```

cp /etc/apache2_old/conf/ssl/* /etc/apache2/ssl/

cp /etc/apache2_old/conf/modules.d/41_mod_ssl.default-vhost.conf /etc/apache2/modules.d/

```

added my vhosts:

```

cat /etc/apache2_old/conf/vhosts/vhosts.conf >> /etc/apache2/vhosts.d/00_default_vhost.conf

```

add this line to /etc/conf.d/apache2

```

APACHE2_OPTS="-D DEFAULT_VHOST -D SSL_DEFAULT_VHOST -D PHP4 -D SSL"

```

restarted apache2.

----------

## Suicidal

About time they made it stable; they have only been talking about it since last spring.

----------

## Redeeman

dont bash about this.. everyone have had the possibility of knowing this change would happen.

----------

## asv

Was anyone able to get their gallery working again?

----------

## asv

 *asv wrote:*   

> Was anyone able to get their gallery working again?

 

I was able to get my gallery fixed by adding this to my vhosts config.

```

<Directory /var/www/localhost/htdocs/gallery>

   AllowOverride Options FileInfo

</Directory>

```

----------

## phekko

I got the webserver working and also gallery by following the advice above but SSL just gives me "connection refused" even though it is supposed to be working, no errors and nmap shows it to be listening on port 443. I'm completely flabbergasted by this...

Ehum. Never mind the above. I upgraded webmin at the same time and used the webmin page as the testing url. Well, obviously if Webmin doesn't work it is not the best page to use as a test. Everything works as it should and I'm now proceeding with hitting myself on the head repeatedly with a blunt object.

----------

