Help - Search - Members - Calendar
Full Version: Cannot find mod_security under httpd_conf after installation.
The Planet Forums > Security > General Security
SuperBaby
I recompiled Apache 2 via WHM and selected PHP5+Image Manipulation+mod_security. After the compilation, I checked the httpd_conf file. I could not find anything related to mod_security except this line:

LoadModule security2_module modules/mod_security2.so

I could not locate anything about this:

QUOTE
<IfModule mod_security.c>
# Turn the filtering engine On or Off
SecFilterEngine On

# Change Server: string
SecServerSignature " "

# Make sure that URL encoding is valid
SecFilterCheckURLEncoding On
.
. .
. . .
. . . .


What is going on?
James Jhurani
Try creating a rule and test it. I ran across a ticket the other day about mod_rewrite. It turns out that mod_rewrite is actually built into easy apache now(there is no loadmodule line in httpd.conf for it either). I wonder if this is the same case when building with mod_security.

"httpd -L" might also be helpful.
SuperBaby
# /usr/local/apache/bin/httpd -l
Compiled in modules:
core.c
mod_access.c
mod_auth.c
mod_include.c
mod_log_config.c
mod_logio.c
mod_env.c
mod_expires.c
mod_headers.c
mod_unique_id.c
mod_setenvif.c
mod_proxy.c
proxy_connect.c
proxy_ftp.c
proxy_http.c
mod_ssl.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_info.c
mod_suexec.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_rewrite.c
mod_so.c

So does that mean mod_security is not installed?
James Jhurani
QUOTE (SuperBaby @ Jan 6 2008, 09:59 AM) *
# /usr/local/apache/bin/httpd -l
Compiled in modules:
core.c
mod_access.c
mod_auth.c
mod_include.c
mod_log_config.c
mod_logio.c
mod_env.c
mod_expires.c
mod_headers.c
mod_unique_id.c
mod_setenvif.c
mod_proxy.c
proxy_connect.c
proxy_ftp.c
proxy_http.c
mod_ssl.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_info.c
mod_suexec.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_rewrite.c
mod_so.c

So does that mean mod_security is not installed?


[root@server1 ~]# httpd -?
Usage: httpd [-D name] [-d directory] [-f file]
[-C "directive"] [-c "directive"]
[-k start|restart|graceful|graceful-stop|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-S]
Options:
-D name : define a name for use in <IfDefine name> directives
-d directory : specify an alternate initial ServerRoot
-f file : specify an alternate ServerConfigFile
-C "directive" : process directive before reading config files
-c "directive" : process directive after reading config files
-e level : show startup errors of level (see LogLevel)
-E file : log startup errors to file
-v : show version number
-V : show compile settings
-h : list available command line options (this page)
-l : list compiled in modules
-L : list available configuration directives
-t -D DUMP_VHOSTS : show parsed settings (currently only vhost settings)
-S : a synonym for -t -D DUMP_VHOSTS
-t -D DUMP_MODULES : show all loaded modules
-M : a synonym for -t -D DUMP_MODULES
-t : run syntax check for config files
[root@server1 ~]#

If its built in, I it wouldn't be considered a compiled in mod anymore. try using capitol "L"... "httpd -L".

If you still don't see it listed, just try using it, and see what happens.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.