Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 208700 - fresh install of apache-2.2.6-r7 doesn't have apache2-builtin-mods from which to generate APACHE2_MODULES
Summary: fresh install of apache-2.2.6-r7 doesn't have apache2-builtin-mods from which...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
Depends on:
Reported: 2008-02-03 07:20 UTC by Steve Yohanan
Modified: 2008-02-03 09:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Steve Yohanan 2008-02-03 07:20:33 UTC
a clean (non-upgrade) install of apache-2.2.6-r7 gave the following error on startup...

* Apache2 has detected a syntax error in your configuration files:
Syntax error on line 17 of /etc/apache2/modules.d/70_mod_php5.conf:
Invalid command 'AddDirectoryIndex', perhaps misspelled or defined by a module not included in the server configuration

this was the result of a minimal set of APACHE2_MODULES from which to work.  (cf. Additional Information)

Reproducible: Always

Steps to Reproduce:
1. fresh os install from 2007.0
2. update portage
3. update (or install) apache (2.2.6-r7)
4. unable to start because no real features are enabled

(this is merely a rough sketch of my procedure).

[i originally started a thread related to this on the forums]

i had an x86 gentoo server that i recently upgraded the hardware to an amd64 machine.  for the gentoo upgrade, i did a clean base install from the 2007.0, then fully upgraded to the latest portage once i got the base system installed.  i may or may not have installed apache and php before i did the portage update.  nonetheless, when i tried to start apache i got the error noted in the bug description.  along the way while doing the os installation, i reverted my system configuration files back from a backup of my original server.  i believe i had no APACHE2_MODULES setting originally when i did the upgrade of apache from the fresh build.

after the error, i looked around the web and noted the Gentoo Upgrading Apache Guide so i followed the appropriate steps.  as referenced in Code Listing 1.1, i did not have a  /etc/apache2/apache2-builtin-mods to work with (since this was a fresh install).  as a result, i decided on an extremely minimal set of APACHE2_MODULES with which to begin, which is why i originally had the startup issue.

to workaround this, once i knew i needed many more settings, i pulled a backup copy of apache2-builtin-mods from my previous server and used that.  seems as if the base version of apache that is installed from a fresh install should have a decent minimal set of APACHE2_MODULES, or at least the documentation should provide some.  as it is, if you don't have an apache2-builtin-mods to work with, you don't have any way of generating it.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-02-03 08:04:03 UTC
(In reply to comment #0)

1/ We are not using apache2-builtin-mods for this any more
2/ If you stick USE="-*" into your make.conf, you get to pick up the pieces, we have sane APACHE2_MODULES defaults in profiles.
Comment 2 Steve Yohanan 2008-02-03 08:39:32 UTC
your RESOLUTION is proper.  i do use '-*'.  i didn't know this was what caused the problem.  sorry for the bother.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2008-02-03 08:43:20 UTC
(In reply to comment #2)
> your RESOLUTION is proper.  i do use '-*'.  i didn't know this was what caused
> the problem.  sorry for the bother.

You should also reinstall bunch of other stuff after fixing the above - like, media-libs/alsa-lib ;) 

Be careful with this -* stuff, it _really_ wipes the default use flags clean, thoroughly.
Comment 4 Steve Yohanan 2008-02-03 09:01:20 UTC
by the way, where in the default profiles are the APACHE2_MODULES defined?  i am looking in make.defaults of /usr/portage/profiles/default-linux/amd64/2007.0/ but see nothing.  even in the lower-depth server and desktop profiles i don't see anything and the USE flags are minimal.

aside: i manage ~8 independent gentoo installations that all are on varying hardware and have different needs.  i had a ton of trouble managing the various USE flags by selectively turning things on/off on each machine, so i moved to using -* then explicitly turning on/off each item listed in use.desc.  i then know what new USE flags there are by diff'ing against my current setup.  i also can manage each machine reasonably well this way since i already have most flags explicitly set.  likely not ideal but it has worked for me for sometime now.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2008-02-03 09:07:26 UTC
(In reply to comment #4)
> by the way, where in the default profiles are the APACHE2_MODULES defined? 


Generally, I'd recomment using the server profiles with lot less bloated flags and adding to them as needed, rather than using the desktop ones and killing the defaults in a drastic way like -*