# Apache setup after world upgrade

## marky9074

I did an update last night and as usual overwrote my configs (knowing I had them backed up), and low and behold apache seems to have changed its config files again?

I see I now have httpd.conf & 00_default_vhost.conf and now....default_vhost.include

But looking at these, this didn't seem to be the problem.  It appears that the http.conf is about a third of the size it was.....and nothing was working.

After realising that my old configs were scratched I went to the installed ones, and started up.....no apache page at localhost...what is going on here?  The strange thing was that after ten minutes or so it started serving directory listings in /var/www/localhost (but the icons are missing)

I updated default_vhost.include and added the following to httpd.conf

 *Quote:*   

> #
> 
> # DirectoryIndex: sets the file that Apache will serve if a directory
> 
> # is requested.
> ...

 

Then it started serving pages again....

Then I added:

 *Quote:*   

> #
> 
> # Filters allow you to process content before it is sent to the client.
> 
> #
> ...

 

And my includes started appearing.....which is interesting as I note that I never actually had "Includes" in the "Options" directive.

Now I am looking around to get php going again....all in all a frustrating morning.  I head over to apache and could not make head nor tail of it.

Am I having a brain fart today?  Or are the supplied config files really devoid of the basics to get apache running?  In the ten years I have been using apache, I have always bumbled through httpd.conf and got it going....but now if I was noob I would not have a chance?

Really confused....

MarkLast edited by marky9074 on Sun Nov 18, 2007 2:30 pm; edited 1 time in total

----------

## bunder

check /etc/conf.d/apache2... it also got updated in that jumble.  

cheers

----------

## marky9074

 *bunder wrote:*   

> check /etc/conf.d/apache2... it also got updated in that jumble.  
> 
> cheers

 

Thanks for that, I noticed this on a search on here..

https://forums.gentoo.org/viewtopic-t-616550-highlight-apache.html

I added the:

```
-D PHP5
```

to the APACHE2_OPTS but now I have...

 *Quote:*   

>  * Caching service dependencies ...                                                                                                                 [ ok ]
> 
>  * Apache2 has detected a syntax error in your configuration files:
> 
> apache2: Syntax error on line 169 of /etc/apache2/httpd.conf: Syntax error on line 4 of /etc/apache2/modules.d/70_mod_php5.conf: API module structure 'php                    5_module' in file /usr/lib/apache2/modules/libphp5.so is garbled - expected signature 41503232 but saw 41503230 - perhaps this is not an Apache module DSO                    , or was compiled for a different Apache version?

 

----------

## marky9074

Emerging again using:

```
USE="cli apache2" emerge 'dev-lang/php'
```

Funny, I never added the -D PHP5 before and I have followed this guide  http://www.gentoo.org/proj/en/php/php-upgrading.xml previously......  :Rolling Eyes: 

----------

## marky9074

OK!   :Very Happy:  All good again, hope these ramblings will help the next person unfortunate enough to have to try and get Apache going!

----------

## marky9074

One more question....are the edits I did to get stuff working in the correct file now?  i.e. I put them in httpd.conf which is where they always used to be?

----------

