Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Wed May 24, 2017 1:08 pm


Tutorials applicable on more than one Unix/Linux OS and shell scripts: ssh / openssl / protocols.

Author Message
debuser
  Post  Post subject: Invalid command 'AddHandler', perhaps misspelled or defined by a module not included in the server..  |  Posted: Thu Jul 22, 2010 2:30 pm

Joined: Thu Aug 06, 2009 2:48 am
Posts: 105

Offline
 

Invalid command 'AddHandler', perhaps misspelled or defined by a module not included in the server..

Quote:
Syntax error on line 428 of /opt/apache-2.2.15_9/etc/apache22/httpd.conf:
Invalid command 'AddHandler', perhaps misspelled or defined by a module not included in the server configuration


I started compiling apache from scratch (I removed almost all the modules). The error above was expected when installing php module.

Fix is to use apche APXS utility to install modules without recompiling apache:

Code:
# /opt/apache-2.2.15_9/sbin/apxs -c -i mod_mime.c


Caution: Use apxs from the version of Apache you want the module installed for (in case you have multiple apache instances).

Code:
# cd /usr/ports/www/apache22/work/httpd-2.2.15/modules/http
# /opt/apache-2.2.15_9/sbin/apxs -c -i mod_mime.c
/usr/local/share/apr/build-1/libtool --silent --mode=compile cc -prefer-pic -O2 -pipe -funroll-loops -march=pentium4 -I/usr/local/include -fno-strict-aliasing   -O2 -pipe -funroll-loops -march=pentium4 -I/usr/local/include -fno-strict-aliasing -g -I/opt/apache-2.2.15_9/include/apache22  -I/usr/local/include/apr-1   -I/usr/local/include/apr-1 -I/usr/local/include  -c -o mod_mime.lo mod_mime.c && touch mod_mime.slo
/usr/local/share/apr/build-1/libtool --silent --mode=link cc -o mod_mime.la  -rpath /opt/apache-2.2.15_9/libexec/apache22 -module -avoid-version    mod_mime.lo
/opt/apache-2.2.15_9/share/apache22/build/instdso.sh SH_LIBTOOL='/usr/local/share/apr/build-1/libtool' mod_mime.la /opt/apache-2.2.15_9/libexec/apache22
/usr/local/share/apr/build-1/libtool --mode=install cp mod_mime.la /opt/apache-2.2.15_9/libexec/apache22/
libtool: install: cp .libs/mod_mime.so /opt/apache-2.2.15_9/libexec/apache22/mod_mime.so
libtool: install: cp .libs/mod_mime.lai /opt/apache-2.2.15_9/libexec/apache22/mod_mime.la
libtool: install: cp .libs/mod_mime.a /opt/apache-2.2.15_9/libexec/apache22/mod_mime.a
libtool: install: chmod 644 /opt/apache-2.2.15_9/libexec/apache22/mod_mime.a
libtool: install: ranlib /opt/apache-2.2.15_9/libexec/apache22/mod_mime.a
----------------------------------------------------------------------
Libraries have been installed in:
   /opt/apache-2.2.15_9/libexec/apache22

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /opt/apache-2.2.15_9/libexec/apache22/mod_mime.so


Now apache 2.2 starts without problems.





Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "Invalid command 'AddHandler', perhaps misspelled or defined by a module not included in the server.."
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. Invalid command 'Order', perhaps misspelled or defined by a module not included in the server config

debuser

0

1883

Tue Jan 12, 2010 7:25 am

debuser View the latest post

There are no new unread posts for this topic. Openssl s_client command line: connect and diagnose an https server

LaR3

0

2503

Wed Aug 26, 2009 3:18 am

LaR3 View the latest post

There are no new unread posts for this topic. Linux - zip command to archive directory recursive

debuser

1

3808

Sat Aug 04, 2012 8:03 am

Harespok View the latest post

There are no new unread posts for this topic. How to check SSL ciphers used in a web server's configuration ciphersuites

mandrei99

1

8714

Fri May 04, 2012 6:28 am

mandrei99 View the latest post

There are no new unread posts for this topic. Using curl to get the HTTP response from an HTTP server

debuser

3

2165

Tue Dec 06, 2011 9:05 am

admin View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO