LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-16-2009, 02:49 AM   #1
saavik
Member
 
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614

Rep: Reputation: 32
mod_clamav 0.23 compile problem


We just updatet clamav and so have to use a new mod_clamav 0.23 .

Configure works:

Code:
./configure --with-apxs=/usr/sbin/apxs2
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for APXS tool... using /usr/sbin/apxs2
checking for apr-1-config tool... checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... i686-suse-linux-gnu
checking host system type... i686-suse-linux-gnu
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ld used by gcc... /usr/i586-suse-linux/bin/ld
checking if the linker (/usr/i586-suse-linux/bin/ld) is GNU ld... yes
checking for /usr/i586-suse-linux/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 98304
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/i586-suse-linux/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/i586-suse-linux/bin/ld
checking if the linker (/usr/i586-suse-linux/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/i586-suse-linux/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/i586-suse-linux/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for cl_scanfile in -lclamav... yes
checking for mkstemp... yes
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for string.h... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking clamav.h usability... yes
checking clamav.h presence... yes
checking for clamav.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mod_clamav_version.h
config.status: creating mod_clamav.html
config.status: creating config.h
config.status: executing depfiles commands
Code:
/home/software/mod_clamav-0.23 # make
make  all-am
make[1]: Entering directory `/home/software/mod_clamav-0.23'
/bin/sh ./libtool --tag=CC   --mode=compile `/usr/sbin/apxs2 -q CC` -DHAVE_CONFIG_H -I.  `apr-1-config --cppflags` `apr-1-config --includes` -I`/usr/sbin/apxs2 -q INCLUDEDIR`  `apr-1-config --cflags` `/usr/sbin/apxs2 -q CFLAGS_SHLIB` -g -O2 -MT mod_clamav_la-config.lo -MD -MP -MF .deps/mod_clamav_la-config.Tpo -c -o mod_clamav_la-config.lo `test -f 'config.c' || echo './'`config.c
/bin/sh: line 1: apr-1-config: command not found
/bin/sh: line 1: apr-1-config: command not found
/bin/sh: line 1: apr-1-config: command not found
mkdir .libs
 gcc -DHAVE_CONFIG_H -I. -I/usr/include/apache2 -g -O2 -MT mod_clamav_la-config.lo -MD -MP -MF .deps/mod_clamav_la-config.Tpo -c config.c  -fPIC -DPIC -o .libs/mod_clamav_la-config.o
In file included from mod_clamav.h:74,
                 from config.c:11:
/usr/include/regex.h:319: error: conflicting types for `REG_NOMATCH'
/usr/include/apache2/pcreposix.h:57: error: previous declaration of `REG_NOMATCH'
/usr/include/regex.h:323: error: conflicting types for `REG_BADPAT'
/usr/include/apache2/pcreposix.h:42: error: previous declaration of `REG_BADPAT'
/usr/include/regex.h:324: error: conflicting types for `REG_ECOLLATE'
/usr/include/apache2/pcreposix.h:46: error: previous declaration of `REG_ECOLLATE'
/usr/include/regex.h:325: error: conflicting types for `REG_ECTYPE'
/usr/include/apache2/pcreposix.h:47: error: previous declaration of `REG_ECTYPE'
/usr/include/regex.h:326: error: conflicting types for `REG_EESCAPE'
/usr/include/apache2/pcreposix.h:48: error: previous declaration of `REG_EESCAPE'
/usr/include/regex.h:327: error: conflicting types for `REG_ESUBREG'
/usr/include/apache2/pcreposix.h:54: error: previous declaration of `REG_ESUBREG'
/usr/include/regex.h:328: error: conflicting types for `REG_EBRACK'
/usr/include/apache2/pcreposix.h:45: error: previous declaration of `REG_EBRACK'
/usr/include/regex.h:329: error: conflicting types for `REG_EPAREN'
/usr/include/apache2/pcreposix.h:50: error: previous declaration of `REG_EPAREN'
/usr/include/regex.h:330: error: conflicting types for `REG_EBRACE'
/usr/include/apache2/pcreposix.h:44: error: previous declaration of `REG_EBRACE'
/usr/include/regex.h:331: error: conflicting types for `REG_BADBR'
/usr/include/apache2/pcreposix.h:41: error: previous declaration of `REG_BADBR'
/usr/include/regex.h:332: error: conflicting types for `REG_ERANGE'
/usr/include/apache2/pcreposix.h:51: error: previous declaration of `REG_ERANGE'
/usr/include/regex.h:333: error: conflicting types for `REG_ESPACE'
/usr/include/apache2/pcreposix.h:53: error: previous declaration of `REG_ESPACE'
/usr/include/regex.h:334: error: conflicting types for `REG_BADRPT'
/usr/include/apache2/pcreposix.h:43: error: previous declaration of `REG_BADRPT'
/usr/include/regex.h:338: error: conflicting types for `REG_ESIZE'
/usr/include/apache2/pcreposix.h:52: error: previous declaration of `REG_ESIZE'
/usr/include/regex.h:420: error: conflicting types for `regex_t'
/usr/include/apache2/pcreposix.h:66: error: previous declaration of `regex_t'
/usr/include/regex.h:451: error: conflicting types for `regmatch_t'
/usr/include/apache2/pcreposix.h:75: error: previous declaration of `regmatch_t'
/usr/include/regex.h:566: error: conflicting types for `regcomp'
/usr/include/apache2/pcreposix.h:79: error: previous declaration of `regcomp'
/usr/include/regex.h:570: error: conflicting types for `regexec'
/usr/include/apache2/pcreposix.h:80: error: previous declaration of `regexec'
/usr/include/regex.h:575: error: conflicting types for `regerror'
/usr/include/apache2/pcreposix.h:81: error: previous declaration of `regerror'
/usr/include/regex.h:578: error: conflicting types for `regfree'
/usr/include/apache2/pcreposix.h:82: error: previous declaration of `regfree'
In file included from config.c:11:
mod_clamav.h:163: error: parse error before "ap_regex_t"
mod_clamav.h:163: warning: no semicolon at end of struct or union
mod_clamav.h:165: error: parse error before '}' token
mod_clamav.h:165: warning: data definition has no type or storage class
config.c: In function `mod_clamav_add_safeuri':
config.c:294: error: `p' undeclared (first use in this function)
config.c:294: error: (Each undeclared identifier is reported only once
config.c:294: error: for each function it appears in.)
config.c:295: error: `ap_regex_t' undeclared (first use in this function)
config.c:295: error: `preg' undeclared (first use in this function)
make[1]: *** [mod_clamav_la-config.lo] Error 1
make[1]: Leaving directory `/home/software/mod_clamav-0.23'
make: *** [all] Error 2
Versions:

OS = SLES9

Apache =
apache2-prefork-2.0.59-1.10
apache2-2.0.59-1.10
apache2-devel-2.0.59-1.10

Clamav=clamav-0.95-1.2


Can anybody help ?

I tried to change apr-1-config to apr-config as I do not have apr-1-config installed, but this leads to a new error :
Code:
 # make
make  all-am
make[1]: Entering directory `/home/software/mod_clamav-0.23'
/bin/sh ./libtool --tag=CC   --mode=compile `/usr/sbin/apxs2 -q CC` -DHAVE_CONFIG_H -I.  `apr-config --cppflags` `apr-config --includes` -I`/usr/sbin/apxs2 -q INCLUDEDIR`  `apr-config --cflags` `/usr/sbin/apxs2 -q CFLAGS_SHLIB` -g -O2 -MT mod_clamav_la-config.lo -MD -MP -MF .deps/mod_clamav_la-config.Tpo -c -o mod_clamav_la-config.lo `test -f 'config.c' || echo './'`config.c
mkdir .libs
 gcc -DHAVE_CONFIG_H -I. -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I/usr/include/apache2 -I/usr/include/apache2 -g -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -pthread -g -O2 -MT mod_clamav_la-config.lo -MD -MP -MF .deps/mod_clamav_la-config.Tpo -c config.c  -fPIC -DPIC -o .libs/mod_clamav_la-config.o
In file included from mod_clamav.h:19,
                 from config.c:11:
/usr/include/apache2/http_config.h:145: warning: function declaration isn't a prototype
In file included from mod_clamav.h:74,
                 from config.c:11:
/usr/include/regex.h:319: error: conflicting types for `REG_NOMATCH'
/usr/include/apache2/pcreposix.h:57: error: previous declaration of `REG_NOMATCH'
/usr/include/regex.h:323: error: conflicting types for `REG_BADPAT'
/usr/include/apache2/pcreposix.h:42: error: previous declaration of `REG_BADPAT'
/usr/include/regex.h:324: error: conflicting types for `REG_ECOLLATE'
/usr/include/apache2/pcreposix.h:46: error: previous declaration of `REG_ECOLLATE'
/usr/include/regex.h:325: error: conflicting types for `REG_ECTYPE'
/usr/include/apache2/pcreposix.h:47: error: previous declaration of `REG_ECTYPE'
/usr/include/regex.h:326: error: conflicting types for `REG_EESCAPE'
/usr/include/apache2/pcreposix.h:48: error: previous declaration of `REG_EESCAPE'
/usr/include/regex.h:327: error: conflicting types for `REG_ESUBREG'
/usr/include/apache2/pcreposix.h:54: error: previous declaration of `REG_ESUBREG'
/usr/include/regex.h:328: error: conflicting types for `REG_EBRACK'
/usr/include/apache2/pcreposix.h:45: error: previous declaration of `REG_EBRACK'
/usr/include/regex.h:329: error: conflicting types for `REG_EPAREN'
/usr/include/apache2/pcreposix.h:50: error: previous declaration of `REG_EPAREN'
/usr/include/regex.h:330: error: conflicting types for `REG_EBRACE'
/usr/include/apache2/pcreposix.h:44: error: previous declaration of `REG_EBRACE'
/usr/include/regex.h:331: error: conflicting types for `REG_BADBR'
/usr/include/apache2/pcreposix.h:41: error: previous declaration of `REG_BADBR'
/usr/include/regex.h:332: error: conflicting types for `REG_ERANGE'
/usr/include/apache2/pcreposix.h:51: error: previous declaration of `REG_ERANGE'
/usr/include/regex.h:333: error: conflicting types for `REG_ESPACE'
/usr/include/apache2/pcreposix.h:53: error: previous declaration of `REG_ESPACE'
/usr/include/regex.h:334: error: conflicting types for `REG_BADRPT'
/usr/include/apache2/pcreposix.h:43: error: previous declaration of `REG_BADRPT'
/usr/include/regex.h:338: error: conflicting types for `REG_ESIZE'
/usr/include/apache2/pcreposix.h:52: error: previous declaration of `REG_ESIZE'
/usr/include/regex.h:420: error: conflicting types for `regex_t'
/usr/include/apache2/pcreposix.h:66: error: previous declaration of `regex_t'
/usr/include/regex.h:451: error: conflicting types for `regmatch_t'
/usr/include/apache2/pcreposix.h:75: error: previous declaration of `regmatch_t'
/usr/include/regex.h:566: error: conflicting types for `regcomp'
/usr/include/apache2/pcreposix.h:79: error: previous declaration of `regcomp'
/usr/include/regex.h:570: error: conflicting types for `regexec'
/usr/include/apache2/pcreposix.h:80: error: previous declaration of `regexec'
/usr/include/regex.h:575: error: conflicting types for `regerror'
/usr/include/apache2/pcreposix.h:81: error: previous declaration of `regerror'
/usr/include/regex.h:578: error: conflicting types for `regfree'
/usr/include/apache2/pcreposix.h:82: error: previous declaration of `regfree'
In file included from config.c:11:
mod_clamav.h:163: error: parse error before "ap_regex_t"
mod_clamav.h:163: warning: no semicolon at end of struct or union
mod_clamav.h:165: error: parse error before '}' token
mod_clamav.h:165: warning: data definition has no type or storage class
config.c: In function `mod_clamav_add_safeuri':
config.c:294: error: `p' undeclared (first use in this function)
config.c:294: error: (Each undeclared identifier is reported only once
config.c:294: error: for each function it appears in.)
config.c:295: error: `ap_regex_t' undeclared (first use in this function)
config.c:295: error: `preg' undeclared (first use in this function)
make[1]: *** [mod_clamav_la-config.lo] Error 1
make[1]: Leaving directory `/home/software/mod_clamav-0.23'
make: *** [all] Error 2

Last edited by saavik; 04-16-2009 at 02:52 AM.
 
Old 04-17-2009, 05:36 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
From mod_clamav page:
Quote:
This version (0.23) is an update of mod_clamav for the current Clamav API (0.95.1) and for Apache 2.2.x.
So since it's written for apache 2.2.x it's not going to work with your apache 2.0.59. That's why you don't have apr-1-config. Because it's available in apache 2.2.x
 
Old 04-28-2009, 07:47 AM   #3
saavik
Member
 
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614

Original Poster
Rep: Reputation: 32
Sorry, my falt!
 
Old 05-26-2009, 06:31 AM   #4
saavik
Member
 
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614

Original Poster
Rep: Reputation: 32
Ok, next problem.

Everything compiling fine, mod can be added, but when i set the mod_clamav as an

SetOutputFilter clamav

I get:

[Tue May 26 13:14:30 2009] [notice] child pid 19007 exit signal Segmentation fault (11)

No I-net page shows up.

Any idea ?
 
Old 05-26-2009, 07:28 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Dunno why apache segfaults.
Try to stop apache with "apachectl stop", make sure that there is no httpd process running and then try to start it and see if mod_clamav works.
I've install it for testing, following the instructions here and it works. I'm using apache 2.2.11, clamav 0.95.1 and the latest mod_clamav 0.23.
You may also enable debugging as per the documentation on the site.
 
Old 05-26-2009, 07:35 AM   #6
saavik
Member
 
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614

Original Poster
Rep: Reputation: 32
Thanks for the reply!

How can I activate debug ?

I don`t understand:

Quote:
If the preprocessor flag CLAMAV_DEBUG is set to 1 instead of the default 0
How is that be done ? By ./configure --clamav_debug=1 ????
 
Old 05-26-2009, 07:43 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
According to mod_clamav homepage you must add a CFLAGS. This is done like this:
Code:
CFLAGS="-DCLAMAV_DEBUG" ./configure --your-options-here
 
Old 05-26-2009, 07:49 AM   #8
saavik
Member
 
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614

Original Poster
Rep: Reputation: 32
Ok, I did that and it works, but where would I find the debug output?
 
Old 05-26-2009, 08:02 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Does apache still segfaults?
Anyway, scrolling down the mod_clamav homepage it says to "run the server with DebugLevel set to debug", so I guess the author means to run apache using "LogLevel debug" in apache httpd.conf.
You can also enable debugging for libclamav by setting the "Debug" option in clamd.conf
 
Old 05-26-2009, 08:29 AM   #10
saavik
Member
 
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614

Original Poster
Rep: Reputation: 32
Ok, I found logs which says:

Quote:
Tue May 26 15:26:16 2009 -> Shutdown closed fd 6
Tue May 26 15:26:16 2009 -> Waiting for all threads to finish
Tue May 26 15:26:16 2009 -> Received POLLIN|POLLHUP on fd 8
Tue May 26 15:26:16 2009 -> Shutdown: closed fd 4
Tue May 26 15:26:16 2009 -> Shutdown: closed fd 5
Tue May 26 15:26:16 2009 -> Shutdown: closed fd 8
Tue May 26 15:26:16 2009 -> Syncpipe write failed
Tue May 26 15:26:16 2009 -> Shutting down the main sockets.
Tue May 26 15:26:16 2009 -> Pid file removed.
Tue May 26 15:26:16 2009 -> --- Stopped at Tue May 26 15:26:16 2009
Tue May 26 15:26:16 2009 -> Closing the main sockets.
Tue May 26 15:26:16 2009 -> Socket file removed.
Tue May 26 15:26:16 2009 -> +++ Started at Tue May 26 15:26:16 2009
Tue May 26 15:26:16 2009 -> clamd daemon 0.95.1 (OS: linux-gnu, ARCH: i386, CPU: i686)
Tue May 26 15:26:16 2009 -> Running as user wwwrun (UID 30, GID 8)
Tue May 26 15:26:16 2009 -> Log file size limited to 2097152 bytes.
Tue May 26 15:26:16 2009 -> Reading databases from /var/lib/clamav
Tue May 26 15:26:16 2009 -> Not loading PUA signatures.
Tue May 26 15:26:18 2009 -> Loaded 561692 signatures.
Tue May 26 15:26:18 2009 -> TCP: Bound to address 127.0.0.1 on port 3310
Tue May 26 15:26:18 2009 -> TCP: Setting connection queue length to 15
Tue May 26 15:26:18 2009 -> LOCAL: Unix socket file /var/run/clamav/clamd
Tue May 26 15:26:18 2009 -> LOCAL: Setting connection queue length to 15
Tue May 26 15:26:18 2009 -> Limits: Global size limit set to 104857600 bytes.
Tue May 26 15:26:18 2009 -> Limits: File size limit set to 26214400 bytes.
Tue May 26 15:26:18 2009 -> Limits: Recursion level limit set to 16.
Tue May 26 15:26:18 2009 -> Limits: Files limit set to 10000.
Tue May 26 15:26:18 2009 -> Limits: Core-dump limit is 0.
Tue May 26 15:26:18 2009 -> Archive support enabled.
Tue May 26 15:26:18 2009 -> Algorithmic detection enabled.
Tue May 26 15:26:18 2009 -> Portable Executable support enabled.
Tue May 26 15:26:18 2009 -> ELF support enabled.
Tue May 26 15:26:18 2009 -> Mail files support enabled.
Tue May 26 15:26:18 2009 -> OLE2 support enabled.
Tue May 26 15:26:18 2009 -> PDF support enabled.
Tue May 26 15:26:18 2009 -> HTML support enabled.
Tue May 26 15:26:18 2009 -> Self checking every 600 seconds.
Tue May 26 15:26:18 2009 -> Listening daemon: PID: 4365
Tue May 26 15:26:18 2009 -> MaxQueue set to: 100
Tue May 26 15:26:18 2009 -> fds_poll_recv: timeout after 600 seconds
But restarting apache2 and accessing the internet does not bring any lines to that log-file.
 
Old 05-26-2009, 08:42 AM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
According to mod_clamav documentation, it's used when you use apache as a proxy. That's why you have to put the "SetOutputFilter CLAMAV" inside a <proxy> tag.
If apache is running ok now, you can check if the filter works at http://localhost/clamav
 
Old 05-26-2009, 08:55 AM   #12
saavik
Member
 
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614

Original Poster
Rep: Reputation: 32
Well, the proxy works fine until I add the output filter
Quote:
Listen 8080

ProxyRequests On
ProxyVia On
AllowConnect 21

ClamavMode daemon
ClamavSocket /var/run/clamav/clamd

ClamavExtendedLogging On
LogFormat "%t %!304{clamav:status}n \
%{Content-type}o \
%{clamav:virusname}n request=\"%r\", \
status=%>s, sent=%!304b, delay=%!304D" \
clamav_stats
CustomLog /var/log/apachescan.log clamav_stats

ClamavTmpDir /usr/clamav-ramdisk/
ClamavDbDir /var/lib/clamav
ClamavSizelimit 100000
ClamavReloadInterval 3600


<Proxy *>
SetOutputFilter clamav
Allow from 127.0.0.1 IPTESTCLIENT
</Proxy>
 
Old 05-26-2009, 09:16 AM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Well, the proxy works fine until I add the output filter
What happens then? Apache segfaults or what? What's written in the apache logs?
Looking at the sample.conf I didn't find the "ClamavReloadInterval 3600" option. Maybe it's from previous versions. Try to remove it and see what happens
 
Old 05-26-2009, 03:37 PM   #14
saavik
Member
 
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614

Original Poster
Rep: Reputation: 32
I will try to remove the "ReloadInterval"

To your question " What happens then ?"

Well....nothing.

I can start my browser, enter the www-adresse and it starts loading, finishes loading, but nothing shows up at the browser. The page is complete empty.

The logs of apache gave me the :

Quote:
[Tue May 26 15:31:35 2009] [notice] child pid 4827 exit signal Segmentation fault (11)
and the clamav logs stay empty.
 
Old 05-27-2009, 05:15 AM   #15
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
It's not the "ReloadInterval". I went ahead and configured my testing apache as a proxy, using mod_clamav and everything worked just fine.
So I guess it's something else, that has to do either with the way you've installed apache, or maybe with SLES apparmor or SELinux, or whatever it uses for enhanced security.

***EDIT***
The clamav logs stay empty, but everything is logged in access and error logs and using the http://localhost/clamav it gives statistics and viruses found in the various downloaded files.

Last edited by bathory; 05-27-2009 at 05:17 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
compile problem rania kamal Linux - Software 2 09-28-2008 01:10 PM
max. filesize for custom log in mod_clamav saavik Linux - Server 2 05-20-2008 01:25 AM
mod_clamav doesn`t scan zip-Files saavik Linux - Security 6 02-06-2007 08:39 AM
C++ compile problem -- HELP !! aherrys Linux - Software 2 01-06-2005 03:29 AM
ntop compile/post-compile problem? tjb Linux - Software 3 12-28-2004 04:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration