# [SOLVED] updated Apache refuse to work properly

## dimril

Recently I updated my Apache to the 2.2.8 version from 2.0.58 (or something like that). I became aware that this update meant some changes to modules, so I used this doc to overcome this modules matter. The problem comes when I perform: 

```
root server # equery depends www-servers/apache

[ Searching for packages depending on www-servers/apache... ]

dev-lang/php-5.2.5-r1 (apache2? =www-servers/apache-2*)

dev-util/subversion-1.4.6 (apache2? =www-servers/apache-2*)
```

 it returns only php and subversion - nothing that seems to help my issue, which is:

```
root server # /etc/init.d/apache2 start

 * Caching service dependencies ...                                                                 [ ok ]

 * Apache2 has detected a syntax error in your configuration files:

Syntax error on line 81 of /etc/apache2/modules.d/00_default_settings.conf:

Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
```

and line ~81 is

```
78: <Directory />

79:         Options FollowSymLinks

80:         AllowOverride None

81:         Order deny,allow

82:         Deny from all

83: </Directory>
```

where I see nothing strange (so I guess there's something wrong elsewhere and I haven't touched this line). I've seen similar issue solved, but it referred to the lack of 'dir' module turned on among USE flags (and I've got it turned on). Do you have any idea?Last edited by dimril on Sat Feb 09, 2008 10:22 pm; edited 1 time in total

----------

## elgato319

those are my useflags which seem to work fine.

```

USE="ssl threads -debug -doc -ldap (-selinux) -sni -static -suexec" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif speling status unique_id userdir usertrack vhost_alias -asis -authn_alias -cern_meta -charset_lite -dumpio -log_forensic -proxy_ftp -version" APACHE2_MPMS="worker -event -itk -peruser -prefork"

```

could you post yours too?

----------

## eXess

```
# revdep-rebuild
```

...is your friend, my friend. 

Last system update probably broke something in modules and dependencies. revdep-rebuild with check depencies in the whole system and find what's wrong. Anyway, it cannot break anything and will find problems only if there are some, so give it a shot. 

Also make sure etc-update did not miss anything in your config files (could lead to some module not loading or other garbage). 

Please tell us what revdep-rebuild said...

----------

## dimril

my USE flags are:

```
www-servers/apache-2.2.8  USE="ldap ssl -debug -doc (-selinux) -sni -static -suexec -threads" APACHE2_MODULES="actions alias asis auth_digest autoindex cache dav dir env expires headers include info log_config logio mime negotiation proxy rewrite setenvif speling status userdir -auth_basic -authn_alias -authn_anon -authn_dbd -authn_dbm -authn_default -authn_file -authz_dbm -authz_default -authz_groupfile -authz_host -authz_owner -authz_user -cern_meta -charset_lite -dav_fs -dav_lock -dbd -deflate -disk_cache -dumpio -ext_filter -file_cache -filter -ident -imagemap -log_forensic -mem_cache -mime_magic -proxy_ajp -proxy_balancer -proxy_connect -proxy_ftp -proxy_http -unique_id -usertrack -version -vhost_alias" APACHE2_MPMS="-event -itk -peruser -prefork -worker"
```

revdep-rebuild finishes it's work fine, but still it doesn't help the problem. etc-update has nothing left to do. Maybe upgrading apache would help? I see there is ~2.2.8-r1.

[edit] upgrading haven't helped :/

----------

## pappy_mcfae

After doing an emerge --sync followed by an emerge --update world, apache was one of the packages selected to be updated ( 2.2.6r-1 to 2.2.8 ). The update failed, but when it did, it coughed up a web address, or somehow directed me to a web page that provided the following information:

```
APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias"
```

This information was to be added to the /etc/make.conf file. I did so, and it finished its update, and started right back up like nothing happened. Anyway, give that a try. it worked twice for me.

Hope that helps...

Blessed be!

Pappy

----------

## magic919

Can you please post output of emerge --info.

----------

## dimril

of course I can:

```
 # emerge --info

Portage 2.1.3.19 (default-linux/x86/2006.1/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.19-gentoo-r5 i686)

=================================================================

System uname: 2.6.19-gentoo-r5 i686 Intel(R) Pentium(R) 4 CPU 1.60GHz

Timestamp of tree: Sat, 09 Feb 2008 07:16:01 +0000

distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]

ccache version 2.4 [enabled]

app-shells/bash:     3.2_p17-r1

dev-java/java-config: 1.3.7, 2.1.4

dev-lang/python:     2.3.6-r4, 2.4.4-r6

dev-python/pycrypto: 2.0.1-r6

dev-util/ccache:     2.4-r7

sys-apps/baselayout: 1.12.10-r5

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.61-r1

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1

sys-devel/binutils:  2.18-r1

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.23-r3

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=pentium4"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -march=pentium4"

DISTDIR="/usr/portage/distfiles"

FEATURES="ccache distcc distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LC_ALL="pl_PL"

LINGUAS="pl"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"

USE="X alsa apache2 arts berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus directfb dri dvd dvdr eds emboss encode esd fam fbcon firefox fortran gdbm gif gpm gstreamer hal iconv ipv6 isdnlog java javascript jpeg kde ldap mad midi mikmod ming mp3 mpeg mplayer mudflap mysql ncurses nls nptl nptlonly nvidia ogg opengl openmp oss pcre perl png ppds pppd python qt qt3 qt4 quicktime readline real reflection samba sdl session spell spl ssl svg tcpd truetype truetype-fonts type1-fonts unicode usb vorbis wifi win32codecs x86 xml xorg xv xvid zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="access auth auth_dbm auth_anon auth_digest alias file-cache echo charset-lite cache disk-cache mem-cache ext-filter case_filter case-filter-in mime-magic cern-meta expires headers unique-id proxy proxy-connect proxy-ftp proxy-http info include cgi cgid dav dav-fs vhost-alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions userdir so" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl" USERLAND="GNU" VIDEO_CARDS="nvidia"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

what's more, I guess the next piece of code may help (messages after emerging apache):

```
 * Messages for package www-servers/apache-2.2.8-r1:

 * Module 'authz_host' is required in the default apache configuration.

 * 

 * You have disabled one or more required modules

 * for the default apache configuration.

 * Although this is not an error, please be

 * aware that this setup is UNSUPPORTED.

 * 

 * 

 * Selected default MPM: prefork

 * 

 * Please note that you need SysV IPC support in your kernel.

 * Make sure CONFIG_SYSVIPC=y is set.

 * 

 * The default webroot has not been installed into

 * /var/www/localhost because the directory already exists

 * and we do not want to overwrite any files you have put there.

 * 

 * If you would like to install the latest webroot, please run

 * emerge --config =apache-2.2.8-r1

 * 

 * GNU info directory index is up-to-date.

```

----------

## magic919

Ok.  Seems you are not getting the use flags you want.  It lacks DIR, for example.

Are you putting them in /etc/make.conf in APACHE2_MODULES= , per the new method?

----------

## dimril

well, if you read into that emerge --info better, you may see that there is APACHE2_MODULES section and at the end of it there is dir module turned on:

APACHE2_MODULES="access auth auth_dbm auth_anon auth_digest alias file-cache echo charset-lite cache disk-cache mem-cache ext-filter case_filter case-filter-in mime-magic cern-meta expires headers unique-id proxy proxy-connect proxy-ftp proxy-http info include cgi cgid dav dav-fs vhost-alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions userdir so"

I tried to reemerge apache with authz_host flag, but it doesn't help. now I got after-emerge-message like this:

```
 * Messages for package www-servers/apache-2.2.8:

 * 

 * Selected default MPM: prefork

 * 

 * Please note that you need SysV IPC support in your kernel.

 * Make sure CONFIG_SYSVIPC=y is set.

 * 

 * The default webroot has not been installed into

 * /var/www/localhost because the directory already exists

 * and we do not want to overwrite any files you have put there.

 * 

 * If you would like to install the latest webroot, please run

 * emerge --config =apache-2.2.8

 * 

 * GNU info directory index is up-to-date.

```

besides, I think I lack APACHE2_MPMS USE flags - are they necessary in any way?

----------

## magic919

Sorry I missed the DIR.  Updating a couple of servers and posting...

That emerge message is fine.  Do you still have the same start error?

----------

## magic919

You don't _have_ to pick an MPM.  It will build with an appropraite MPM, depending on whether you have THREADS or not.

----------

## dimril

It's really hard to tell, but it 'fixed itself' after many reemerging. I tried changing flags - turning on threads and works mpm (which needed php to be recompiled) and it looked better (only some etc-problems). Then I tried turning them off, and surprisingly it also worked. I suppose something might have been wrong with cache-files or something. Thanks for your concern - I think the problem is [SOLVED].

----------

