# [solved] Trouble installing apache modules

## dacid

I'm in processing of installing apache on a new server.

My first try, I didn't really pay attention to the emerge, log.

and when I try it to start I get this error

 * 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

so I did a little research and it seems some modules are being installed when I emerge.

In particular, I get this warning when I try to emerge:

```

 * Selected default MPM: prefork

 *

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

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

 * Module 'mime' 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.

 *

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

 * Make sure CONFIG_SYSVIPC=y is set.

```

So, I've been trying to figure out to enable the required modules (or change the MPM, not sure which I need to do).

Anyway, any suggestions as to what I need to do?

Here is my /etc/make.conf:

```

# These settings were set by the catalyst build script that automatically built this stage

# Please consult /etc/make.conf.example for a more detailed example

CFLAGS="-march=athlon64 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CXXFLAGS="${CFLAGS}"

MAKEOPTS="-j3"

FEATURES="distcc"

#MAKEOPTS="-j2"

INPUT_DEVICES="keyboard mouse"

VIDEO_CARDS="nvidia"

ALSA_CARDS="snd-hda-intel"

#ALSA_CARDS="intel8x0"

PORTDIR_OVERLAY="/usr/local/portage"

USE="amd64 a52 aac alsa acpi apache2 cdparanoia cups dvb dvd dvdread encode \

ffmpeg flac -gnome -gtk gphoto2 ieee1394 java jpeg kde mjpeg \

lirc lm_sensors mad multilib mp3 mysql ncurses ogg oggvorbis perl qt \

posix quicktime real samba sockets sse ssl truetype usb v4l vcd vorbis \

win32codecs thread xine xml xmms xosd xv xvid xvmc foomaticdb ppds \

lirc_devices_hauppauge unicode opengl  "

SYNC="rsync://dawk/gentoo-portage"

GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ htt

p://gentoo.mirrors.pair.com/ "

PORTDIR=/mnt/nfs_portage

PKGDIR=/mnt/nfs_portage/packages

DISTDIR=/usr/portage/distfiles

RPMDIR=/mnt/nfs_portage/rpm

PORTAGE_TMPDIR=/var/tmp

APACHE2_MPMS="worker"

#APACHE2_MODULES=""

```

Last edited by dacid on Wed Apr 09, 2008 10:56 pm; edited 1 time in total

----------

## star3am

Hi, if you have emerged apache on that box before, you can do this to get your modules into /etc/make.conf

```
$ echo APACHE2_MODULES=\"$(sed '/^mod_/s/mod_\(.*\)\s\+\(shared\|static\)/\1/;t n;d;:n' /etc/apache2/apache2-builtin-mods)\" >> /etc/make.conf

# rm /etc/apache2/apache2-builtin-mods
```

this is taken from Upgrading Apache http://www.gentoo.org/proj/en/apache/doc/upgrading.xml

my apache part in /etc/make.conf looks like ..

```
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"

APACHE2_MPMS="worker"
```

hope that helps, all the best  :Wink: 

ciao/Riaan

www.3am.co.za

----------

## dacid

Thanks for the suggestion.  Honestly, I can't remember if I had previously installed apache on this box or not.  

I don't have a /etc/apache2/apache2-builtin-mods file, so I'm guessing the answer is no.

I added the APAPCHE_MODULES section to my /etc/make.conf, but when I do emerge -pv apache

```

Calculating dependencies... done!

[ebuild   R   ] www-servers/apache-2.2.8  USE="ssl -apache2_modules_actions -apache2_modules_alias -apache2_modules_asis -apache2_modules_auth_basic -apache2_modules_auth_digest -apache2_modules_authn_alias -apache2_modules_authn_anon -apache2_modules_authn_dbd -apache2_modules_authn_dbm -apache2_modules_authn_default -apache2_modules_authn_file -apache2_modules_authz_dbm -apache2_modules_authz_default -apache2_modules_authz_groupfile -apache2_modules_authz_host -apache2_modules_authz_owner -apache2_modules_authz_user -apache2_modules_autoindex -apache2_modules_cache -apache2_modules_cern_meta -apache2_modules_charset_lite -apache2_modules_dav -apache2_modules_dav_fs -apache2_modules_dav_lock -apache2_modules_dbd -apache2_modules_deflate -apache2_modules_dir -apache2_modules_disk_cache -apache2_modules_dumpio -apache2_modules_env -apache2_modules_expires -apache2_modules_ext_filter -apache2_modules_file_cache -apache2_modules_filter -apache2_modules_headers -apache2_modules_ident -apache2_modules_imagemap -apache2_modules_include -apache2_modules_info -apache2_modules_log_config -apache2_modules_log_forensic -apache2_modules_logio -apache2_modules_mem_cache -apache2_modules_mime -apache2_modules_mime_magic -apache2_modules_negotiation -apache2_modules_proxy -apache2_modules_proxy_ajp -apache2_modules_proxy_balancer -apache2_modules_proxy_connect -apache2_modules_proxy_ftp -apache2_modules_proxy_http -apache2_modules_rewrite -apache2_modules_setenvif -apache2_modules_speling -apache2_modules_status -apache2_modules_unique_id -apache2_modules_userdir -apache2_modules_usertrack -apache2_modules_version -apache2_modules_vhost_alias -apache2_mpms_event -apache2_mpms_itk -apache2_mpms_peruser -apache2_mpms_prefork -apache2_mpms_worker -debug -doc -ldap (-selinux) -sni -static -suexec -threads" 0 kB

```

so, if I'm reading this right, my settings in /etc/make.conf aren't taking effect for some reason, as emerge still isn't going to build my apache modules.

Here's the apache section of my now updated make.conf

```

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"

APACHE2_MPMS="worker"

```

This is very strange...

----------

## magic919

Please post output of emerge --info

----------

## dacid

```

curtis dave # emerge --info

Portage 2.1.4.4 (!..//usr/portage/profiles/default-linux/amd64/2007.0, gcc-4.1.1, glibc-2.4-r3, 2.6.20.6 x86_64)

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

System uname: 2.6.20.6 x86_64 AMD Sempron(tm) Processor 3200+

Timestamp of tree: Tue, 08 Apr 2008 07:02:01 +0000

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

app-shells/bash:     3.2_p17-r1

dev-java/java-config: 1.3.7, 2.0.33-r1

dev-lang/python:     2.4.3-r1

dev-python/pycrypto: 2.0.1-r6

sys-apps/baselayout: 1.12.9-r2

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.61

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

sys-devel/binutils:  2.16.1-r3

sys-devel/gcc-config: 1.3.13-r3

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.11-r2

ACCEPT_KEYWORDS="amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=athlon64 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/terminfo"

CXXFLAGS="-march=athlon64 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

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

GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ http://gentoo.mirrors.pair.com/ "

LANG="en_US.UTF-8"

MAKEOPTS="-j3"

PKGDIR="/mnt/nfs_portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/mnt/nfs_portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://dawk/gentoo-portage"

USE="a52 aac acl acpi alsa amd64 apache2 berkdb bitmap-fonts cdparanoia cli cracklib crypt cups dri dvb dvd dvdread encode ffmpeg flac foomaticdb fortran gdbm gphoto2 gpm iconv ieee1394 ipv6 isdnlog java jpeg kde libg++ lirc lm_sensors mad midi mjpeg mmx mp3 mudflap mysql ncurses nls nptl nptlonly ogg oggvorbis opengl openmp pam pcre perl posix ppds pppd python qt quicktime readline reflection samba session sockets spl sse sse2 ssl tcpd thread truetype truetype-fonts type1-fonts unicode usb v4l vcd vorbis xine xml xorg xosd xv xvid xvmc zlib" ALSA_CARDS="snd-hda-intel" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIRC_DEVICES="hauppauge" USERLAND="GNU" VIDEO_CARDS="nvidia"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

----------

## magic919

I think your profile is not correctly set.

----------

## dacid

Yes, that was it.  I used the eselect tool to make the profile setting valid, and now emerge -pv apache shows the APACHE2_MODULES setting being picked up correctly.

Thanks for the help!

----------

