Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] new apache-2.2.6-r7 fails on AddDirectoryIndex
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
njuk-njuk
n00b
n00b


Joined: 24 Aug 2003
Posts: 65
Location: New York, NY

PostPosted: Sat Feb 02, 2008 12:48 am    Post subject: [solved] new apache-2.2.6-r7 fails on AddDirectoryIndex Reply with quote

i am getting the following on a clean install of apache-2.2.6-r7 when i try to start it up...

Code:
 * 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


i am assuming i have something missing in the build. here are my related settings for apache...

(make.conf)
Code:
APACHE2_MODULES="authz_host dir mime"
APACHE2_MPMS="worker"
USE="doc ssl threads"


(in /etc/conf.d/apache2)
Code:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D MANUAL -D SSL -D SSL_DEFAULT_VHOST -D PHP5 -D PYTHON"


any help appreciated.


Last edited by njuk-njuk on Sun Feb 03, 2008 3:15 am; edited 1 time in total
Back to top
View user's profile Send private message
OmSai
l33t
l33t


Joined: 30 Sep 2007
Posts: 604
Location: Manchester, CT, USA

PostPosted: Sat Feb 02, 2008 9:54 pm    Post subject: Reply with quote

Here's your problem, your APACHE2_MODULES is incomplete.
/etc/make.conf:
APACHE2_MODULES="authz_host dir mime"
APACHE2_MPMS="worker"
USE="doc ssl threads"

Mine looks like:
/etc/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"


You have to move all modules over to APACHE2_MODULES in your /etc/make.conf
To do that, run Code Listing 1.1 from the Gentoo guide: Upgrading Apache.
_________________
Gentoo is the stick-shift of Linux.
You work it manually, it has somewhat better performance, but it's really for the fun of it.
Back to top
View user's profile Send private message
njuk-njuk
n00b
n00b


Joined: 24 Aug 2003
Posts: 65
Location: New York, NY

PostPosted: Sun Feb 03, 2008 3:14 am    Post subject: Reply with quote

om wrote:
You have to move all modules over to APACHE2_MODULES in your /etc/make.conf
To do that, run Code Listing 1.1 from the Gentoo guide: Upgrading Apache.


thanks, om. i actually saw that in the upgrade guide; however, since this was a clean install i didn't have any /etc/apache2/apache2-builtin-mods from which to work. after you convinced me this was needed, i pulled a copy of this file from a similar system that still has the older version of apache. i'm up and running now.
Back to top
View user's profile Send private message
OmSai
l33t
l33t


Joined: 30 Sep 2007
Posts: 604
Location: Manchester, CT, USA

PostPosted: Sun Feb 03, 2008 6:32 am    Post subject: Reply with quote

njuk-njuk,

Since you've established that that was the workaround, could you please file your situation on Gentoo Bugzilla?
Your situation should not have occurred on a fresh install of Apache.

I ran the advanced search, and no-one has reported the problem yet.
_________________
Gentoo is the stick-shift of Linux.
You work it manually, it has somewhat better performance, but it's really for the fun of it.
Back to top
View user's profile Send private message
njuk-njuk
n00b
n00b


Joined: 24 Aug 2003
Posts: 65
Location: New York, NY

PostPosted: Sun Feb 03, 2008 7:22 am    Post subject: Reply with quote

om wrote:
njuk-njuk,

Since you've established that that was the workaround, could you please file your situation on Gentoo Bugzilla?
Your situation should not have occurred on a fresh install of Apache.

I ran the advanced search, and no-one has reported the problem yet.


ok created Bug #208700 (albeit a bit messy of a description since i wasn't sure what steps i performed in what order).
Back to top
View user's profile Send private message
njuk-njuk
n00b
n00b


Joined: 24 Aug 2003
Posts: 65
Location: New York, NY

PostPosted: Sun Feb 03, 2008 8:42 am    Post subject: Reply with quote

ah, after posting the bug they responded with the fact that it is likely a result of using '-*' in make.conf. as they state, there are sane APACHE2_MODULES defaults in the profile. i do use '-*' which affects the use of these variables from the default profiles. my bad.
Back to top
View user's profile Send private message
rmcknt
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2002
Posts: 77
Location: Ingolstadt, Germany

PostPosted: Sun Feb 03, 2008 10:13 am    Post subject: Reply with quote

I'm having the exact problem here as well. Apache tells me that a module is missing when trying to use AddDirectoryIndex

So Which Module provides AddDirectoryIndex?

Here's my apache config

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

_________________
Real software engineers don't debug programs, they verify correctness.
Back to top
View user's profile Send private message
rmcknt
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2002
Posts: 77
Location: Ingolstadt, Germany

PostPosted: Sun Feb 03, 2008 10:38 am    Post subject: Reply with quote

Seems like AddDirectoryIndex has been depracted and removed.
https://bugs.gentoo.org/show_bug.cgi?id=139451
_________________
Real software engineers don't debug programs, they verify correctness.
Back to top
View user's profile Send private message
OmSai
l33t
l33t


Joined: 30 Sep 2007
Posts: 604
Location: Manchester, CT, USA

PostPosted: Sun Feb 03, 2008 4:37 pm    Post subject: Reply with quote

Spin-Doc,

Did you emerge --sync before emerging apache2?
Are you upgrading or is it a new install?

Spin-Doc wrote:
So Which Module provides AddDirectoryIndex?
From njuk-njuk's OP....
* 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
_________________
Gentoo is the stick-shift of Linux.
You work it manually, it has somewhat better performance, but it's really for the fun of it.
Back to top
View user's profile Send private message
njuk-njuk
n00b
n00b


Joined: 24 Aug 2003
Posts: 65
Location: New York, NY

PostPosted: Sun Feb 03, 2008 9:23 pm    Post subject: Reply with quote

Spin-Doc wrote:
I'm having the exact problem here as well. Apache tells me that a module is missing when trying to use AddDirectoryIndex

So Which Module provides AddDirectoryIndex?

Here's my apache config

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


i originally used an old /etc/apache2/apache2-builtin-mods to generate my APACHE2_MODULES but eventually reverted to the base defaults in /usr/portage/profiles/base/make.defaults (shown below). to be honest, i don't know which one deals with the AddDirectoryIndex directive; however, upon using these i was able to get apache to run.

Code:
# Benedikt Böhm <hollow@gentoo.org> (27 Nov 2007)
# Sane defaults for built-in apache modules
APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias"
Back to top
View user's profile Send private message
kkrizka
n00b
n00b


Joined: 30 Jul 2007
Posts: 14

PostPosted: Sun Feb 10, 2008 11:03 pm    Post subject: Reply with quote

I tried enabling all of the apache modules, but that did not solve the problem. Any other tips? I am running Apache 2.2.8-r1.
Back to top
View user's profile Send private message
qQsh
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2005
Posts: 86

PostPosted: Fri Jun 27, 2008 9:56 pm    Post subject: Reply with quote

kkrizka wrote:
I tried enabling all of the apache modules, but that did not solve the problem. Any other tips? I am running Apache 2.2.8-r1.
Run etc-update or dispatch-conf or just change AddDirectoryIndex to DirectoryIndex .
Back to top
View user's profile Send private message
cjubon
Guru
Guru


Joined: 03 Jul 2007
Posts: 440
Location: Vienna/Europe

PostPosted: Sun Jun 29, 2008 7:00 pm    Post subject: Reply with quote

Same problem here (one week ago, I saw this thread just now).

Yep, simply solved by changing "AddDirectoryIndex" to "DirectoryIndex" in the relevant file (/etc/apache2/modules.d/70_mod_php5.conf, in my case).

However, some docs hidden in the default config files need an update, as well:
grep AddDirectoryIndex /etc/apache2/modules.d/* wrote:
...
/etc/apache2/modules.d/00_default_settings.conf:# To add files to that list use AddDirectoryIndex in a custom config
...
I'm not sure whether to report this doc-issue in one of the bug reports cited here.
_________________
Mandrake Dec 2001 · Debian "Woody" Aug 2002 · Gentoo Jan 2004 · Funtoo Oct 2009
Back to top
View user's profile Send private message
orange_juice
Guru
Guru


Joined: 16 Feb 2006
Posts: 588
Location: Athens - Greece

PostPosted: Sat Sep 20, 2008 12:08 pm    Post subject: Reply with quote

cjubon wrote:
Yep, simply solved by changing "AddDirectoryIndex" to "DirectoryIndex" in the relevant file (/etc/apache2/modules.d/70_mod_php5.conf, in my case).


Kind regards,
orange_juice
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum