{"id":135,"date":"2011-11-27T07:27:00","date_gmt":"2011-11-27T07:27:00","guid":{"rendered":"http:\/\/pheonixsolutions.com\/?p=135"},"modified":"2011-11-27T07:27:00","modified_gmt":"2011-11-27T07:27:00","slug":"mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\/","title":{"rendered":"mod_security &#8211; how to compile mod_security in Apache 1.3 or 2.x"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\" trbidi=\"on\">How to compile Apache with mod_security.<\/p>\n<p>First we will download and unzip mod_security.<\/p>\n<p>&#8212;&#8211;command&#8212;&#8211;<br \/>wget http:\/\/www.modsecurity.org\/download\/modsecurity-apache_1.9.4.tar.gz<br \/>tar -zxf modsecurity-apache_1.9.4.tar.gz<br \/>&#8212;&#8211;command&#8212;&#8211;<\/p>\n<p>If you are using Apache 1.3.x you need to go into the apache1 directory as shown below. <\/p>\n<p>&#8212;&#8211;command&#8212;&#8211; <br \/>cd modsecurity-apache_1.9.4\/apache1<br \/>&#8212;&#8211;command&#8212;&#8211; <\/p>\n<p>If you are using Apache 2.x you need to go into the apache 2 directory as shown below. Plesk uses apache 2.x and may require the httpd-devel rpm to be installed to get mod_security working. <br \/>&#8212;&#8211;command&#8212;&#8211; <br \/>cd modsecurity_1.9.4\/apache2<br \/>&#8212;&#8211;command&#8212;&#8211; <\/p>\n<p>Next compile mod_security at a module. One of the lines below should work to compile it.<br \/>&#8212;&#8211;command&#8212;&#8211;<br \/>\/etc\/httpd\/bin\/apxs -cia mod_security.c<br \/>&#8212;&#8211;command&#8212;&#8211;<\/p>\n<p>If you get a file not found install httpd-devel using up2date then try to compile it again. This will work fine on Plesk and the newer versions of Ensim that do not use &#8220;ensimized&#8221; httpd rpms. If you are running below Ensim 4.0 you should not continue unless you are certain of what you are doing.<br \/>&#8212;&#8211;command&#8212;&#8211;<br \/>up2date -i httpd-devel<br \/>\/usr\/sbin\/apxs -cia mod_security.c<br \/>&#8212;&#8211;command&#8212;&#8211;<\/p>\n<p>Make a backup of your httpd.conf before touching anything so you have something to go back to if it does not work.<br \/>&#8212;&#8211;command&#8212;&#8211;<br \/>cp \/etc\/httpd\/conf\/httpd.conf \/etc\/httpd\/conf\/httpd.conf-mod_sec<br \/>&#8212;&#8211;command&#8212;&#8211;<\/p>\n<p>Now edit the httpd.conf , even though Ensim has multiple httpd.conf files you can put it in the primary config. <br \/>&#8212;&#8211;command&#8212;&#8211;<br \/>pico -w \/etc\/httpd\/conf\/httpd.conf<br \/>&#8212;&#8211;command&#8212;&#8211;<\/p>\n<p>If you are running Apache 1.3.x <br \/>Scroll down below the following line: AddModule mod_security.c<\/p>\n<p>If you do not have the addmodule line find where the rest of them are located and put it right below the others. <\/p>\n<p>If you are running Apache 2.x <br \/>Scroll down below the following line at which point you can continue on and paste the rule-set. <br \/>LoadModule security_module modules\/mod_security.so<\/p>\n<p>Now you are going to paste in this ruleset. Please feel free to modify it as you see fit. I think that it is a very non-agreesive ruleset that will work fine on just about any server. Please post any problems you have with it below!<\/p>\n<p>&#8212;-Ruleset&#8212;-<br \/><ifmodule mod_security.c=\"\"><br \/># Turn the filtering engine On or Off<br \/>SecFilterEngine On<\/p>\n<p># Change Server: string<br \/>SecServerSignature &#8220;Apache&#8221;<\/p>\n<p># This setting should be set to On only if the Web site is<br \/># using the Unicode encoding. Otherwise it may interfere with<br \/># the normal Web site operation.<br \/>SecFilterCheckUnicodeEncoding Off<\/p>\n<p># The audit engine works independently and<br \/># can be turned On of Off on the per-server or<br \/># on the per-directory basis. &#8220;On&#8221; will log everything,<br \/># &#8220;DynamicOrRelevant&#8221; will log dynamic requests or violations,<br \/># and &#8220;RelevantOnly&#8221; will only log policy violations<br \/>SecAuditEngine RelevantOnly<\/p>\n<p># The name of the audit log file<br \/>SecAuditLog logs\/audit_log<\/p>\n<p># Should mod_security inspect POST payloads<br \/>SecFilterScanPOST On<\/p>\n<p># Action to take by default<br \/>SecFilterDefaultAction &#8220;deny,log,status:403&#8221;<\/p>\n<p>## ## ## ## ## ## ## ## ## ##<br \/>## ## ## ## ## ## ## ## ## ##<br \/># Require HTTP_USER_AGENT and HTTP_HOST in all requests<br \/># SecFilterSelective &#8220;HTTP_USER_AGENT|HTTP_HOST&#8221; &#8220;^$&#8221;<br \/># Require Content-Length to be provided with<br \/># every POST request<br \/>SecFilterSelective REQUEST_METHOD &#8220;^POST$&#8221; chain<br \/>SecFilterSelective HTTP_Content-Length &#8220;^$&#8221;<\/p>\n<p># Don&#8217;t accept transfer encodings we know we don&#8217;t handle<br \/># (and you don&#8217;t need it anyway)<br \/>SecFilterSelective HTTP_Transfer-Encoding &#8220;!^$&#8221;<\/p>\n<p># Protecting from XSS attacks through the PHP session cookie<br \/>SecFilterSelective ARG_PHPSESSID &#8220;!^[0-9a-z]*$&#8221;<br \/>SecFilterSelective COOKIE_PHPSESSID &#8220;!^[0-9a-z]*$&#8221;<br \/>SecFilter &#8220;viewtopic\\.php\\?&#8221; chain<br \/>SecFilter &#8220;chr\\(([0-9]{1,3})\\)&#8221; &#8220;deny,log&#8221;<\/p>\n<p># Block various methods of downloading files to a server<br \/>SecFilterSelective THE_REQUEST &#8220;wget &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;lynx &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;scp &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;ftp &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;cvs &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;rcp &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;curl &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;telnet &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;ssh &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;echo &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;links -dump &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;links -dump-charset &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;links -dump-width &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;links http:\/\/ &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;links ftp:\/\/ &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;links -source &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;mkdir &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;cd \/tmp &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;cd \/var\/tmp &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;cd \/etc\/httpd\/proxy &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;\/config.php?v=1&#038;DIR &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;&#038;highlight=%2527%252E &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;changedir=%2Ftmp%2F.php &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;arta\\.zip &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;cmd=cd\\x20\/var &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;HCL_path=http &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;clamav-partial &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;vi\\.recover &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;netenberg &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;psybnc &#8220;<br \/>SecFilterSelective THE_REQUEST &#8220;fantastico_de_luxe &#8220;<\/p>\n<p>SecFilter &#8220;bcc:&#8221; <br \/>SecFilter &#8220;bcc\\x3a&#8221; <br \/>SecFilter &#8220;cc:&#8221; <br \/>SecFilter &#8220;cc\\x3a&#8221; <br \/>SecFilter &#8220;bcc:|Bcc:|BCC:&#8221; chain <br \/>SecFilter &#8220;[A-Z0-9._%-]+@[A-Z0-9._%-]+\\.[A-Z]{2,4}\\,\\x20[A-Z0-9._%-]+@[A-Z0-9._%-]+\\.[A-Z]{2,4}&#8221; <br \/>SecFilterSelective POST_PAYLOAD &#8220;Bcc:&#8221; <br \/>SecFilterSelective POST_PAYLOAD &#8220;Bcc:\\x20&#8221; <br \/>SecFilterSelective POST_PAYLOAD &#8220;cc:&#8221; <br \/>SecFilterSelective POST_PAYLOAD &#8220;cc:\\x20&#8221; <br \/>SecFilterSelective POST_PAYLOAD &#8220;bcc:&#8221; <br \/>SecFilterSelective POST_PAYLOAD &#8220;bcc:\\x20&#8221; <br \/>SecFilterSelective POST_PAYLOAD &#8220;bcc: &#8221; <br \/>SecFilterSelective THE_REQUEST &#8220;Bcc:&#8221; <br \/>SecFilterSelective THE_REQUEST &#8220;Bcc:\\x20&#8221; <br \/>SecFilterSelective THE_REQUEST &#8220;cc:&#8221; <br \/>SecFilterSelective THE_REQUEST &#8220;cc:\\x20&#8221; <br \/>SecFilterSelective THE_REQUEST &#8220;bcc:&#8221; <br \/>SecFilterSelective THE_REQUEST &#8220;bcc:\\x20&#8221; <br \/>SecFilterSelective THE_REQUEST &#8220;bcc: &#8221; <\/p>\n<p># WEB-PHP phpbb quick-reply.php arbitrary command attempt <br \/>SecFilterSelective THE_REQUEST &#8220;\/quick-reply\\.php&#8221; chain <br \/>SecFilter &#8220;phpbb_root_path=&#8221; <\/p>\n<p><\/ifmodule><\/p>\n<p>&#8212;\/Ruleset&#8212; <\/p>\n<p>Now simply restart apache to enable mod_security. <\/p>\n<p>&#8212;&#8211;command&#8212;&#8211;<br \/>service httpd restart<br \/>&#8212;&#8211;command&#8212;&#8211;<\/p>\n<p>If sites start to have problems look at error log.<br \/>\/etc\/httpd\/logs\/audit_log<br \/>If you need or want to remove mod_security at any time simply comment out (put a # in front of) the AddModule mod_security.c line and restart apache. This will disable all of the rules and not allow it to load into apache. <\/p>\n<p>Ok mod_security is all setup. I would tail the audit log occasionally to see if it is causing any trouble with legit traffic. The ruleset above should not cause many problems though. Thanks to all that have helped with the rules for this especially ryan at rfxnetworks and err0r. I have also adapted some rules from suggestions on the netberg forums by HostMerit.<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>How to compile Apache with mod_security. First we will download and unzip mod_security. &#8212;&#8211;command&#8212;&#8211;wget http:\/\/www.modsecurity.org\/download\/modsecurity-apache_1.9.4.tar.gztar -zxf modsecurity-apache_1.9.4.tar.gz&#8212;&#8211;command&#8212;&#8211; If you are using Apache 1.3.x you need to go into the apache1 directory as shown below. &#8212;&#8211;command&#8212;&#8211; cd modsecurity-apache_1.9.4\/apache1&#8212;&#8211;command&#8212;&#8211; If you are using Apache 2.x you need to go into the apache&hellip; <a href=\"https:\/\/pheonixsolutions.com\/blog\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\/\" class=\"more-link read-more\" rel=\"bookmark\">Continue Reading <span class=\"screen-reader-text\">mod_security &#8211; how to compile mod_security in Apache 1.3 or 2.x<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":{"0":"post-135","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-uncategorized","7":"h-entry","9":"h-as-article"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Pheonix Solutions - We Empower Your Business Growth<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/blog\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pheonix Solutions - We Empower Your Business Growth\" \/>\n<meta property=\"og:description\" content=\"How to compile Apache with mod_security. First we will download and unzip mod_security. &#8212;&#8211;command&#8212;&#8211;wget http:\/\/www.modsecurity.org\/download\/modsecurity-apache_1.9.4.tar.gztar -zxf modsecurity-apache_1.9.4.tar.gz&#8212;&#8211;command&#8212;&#8211; If you are using Apache 1.3.x you need to go into the apache1 directory as shown below. &#8212;&#8211;command&#8212;&#8211; cd modsecurity-apache_1.9.4\/apache1&#8212;&#8211;command&#8212;&#8211; If you are using Apache 2.x you need to go into the apache&hellip; Continue Reading mod_security &#8211; how to compile mod_security in Apache 1.3 or 2.x\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/blog\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\/\" \/>\n<meta property=\"og:site_name\" content=\"PHEONIXSOLUTIONS\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/\" \/>\n<meta property=\"article:published_time\" content=\"2011-11-27T07:27:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/09\/PX2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"3837\" \/>\n\t<meta property=\"og:image:height\" content=\"2540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pheonixsolution\" \/>\n<meta name=\"twitter:site\" content=\"@pheonixsolution\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/0ffa33d73c869faec2d50e79c24e3503\"},\"headline\":\"mod_security &#8211; how to compile mod_security in Apache 1.3 or 2.x\",\"datePublished\":\"2011-11-27T07:27:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\\\/\"},\"wordCount\":962,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\\\/\",\"name\":\"Pheonix Solutions - We Empower Your Business Growth\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#website\"},\"datePublished\":\"2011-11-27T07:27:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"mod_security &#8211; how to compile mod_security in Apache 1.3 or 2.x\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\",\"name\":\"Pheonix Solutions\",\"description\":\"We Empower Your Business Growth\",\"publisher\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\",\"name\":\"PheonixSolutions\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/logo.png\",\"width\":454,\"height\":300,\"caption\":\"PheonixSolutions\"},\"image\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/PheonixSolutions-209942982759387\\\/\",\"https:\\\/\\\/x.com\\\/pheonixsolution\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/0ffa33d73c869faec2d50e79c24e3503\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"http:\\\/\\\/blog.pheonixsolutions.com\"],\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pheonix Solutions - We Empower Your Business Growth","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pheonixsolutions.com\/blog\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\/","og_locale":"en_US","og_type":"article","og_title":"Pheonix Solutions - We Empower Your Business Growth","og_description":"How to compile Apache with mod_security. First we will download and unzip mod_security. &#8212;&#8211;command&#8212;&#8211;wget http:\/\/www.modsecurity.org\/download\/modsecurity-apache_1.9.4.tar.gztar -zxf modsecurity-apache_1.9.4.tar.gz&#8212;&#8211;command&#8212;&#8211; If you are using Apache 1.3.x you need to go into the apache1 directory as shown below. &#8212;&#8211;command&#8212;&#8211; cd modsecurity-apache_1.9.4\/apache1&#8212;&#8211;command&#8212;&#8211; If you are using Apache 2.x you need to go into the apache&hellip; Continue Reading mod_security &#8211; how to compile mod_security in Apache 1.3 or 2.x","og_url":"https:\/\/pheonixsolutions.com\/blog\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\/","og_site_name":"PHEONIXSOLUTIONS","article_publisher":"https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/","article_published_time":"2011-11-27T07:27:00+00:00","og_image":[{"width":3837,"height":2540,"url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/09\/PX2.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@pheonixsolution","twitter_site":"@pheonixsolution","twitter_misc":{"Written by":"admin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/blog\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/blog\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\/"},"author":{"name":"admin","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/person\/0ffa33d73c869faec2d50e79c24e3503"},"headline":"mod_security &#8211; how to compile mod_security in Apache 1.3 or 2.x","datePublished":"2011-11-27T07:27:00+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/blog\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\/"},"wordCount":962,"commentCount":0,"publisher":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#organization"},"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/blog\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/blog\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\/","url":"https:\/\/pheonixsolutions.com\/blog\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\/","name":"Pheonix Solutions - We Empower Your Business Growth","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#website"},"datePublished":"2011-11-27T07:27:00+00:00","breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/blog\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/blog\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/blog\/mod_security-how-to-compile-mod_security-in-apache-1-3-or-2-x\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/blog\/"},{"@type":"ListItem","position":2,"name":"mod_security &#8211; how to compile mod_security in Apache 1.3 or 2.x"}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/blog\/#website","url":"https:\/\/pheonixsolutions.com\/blog\/","name":"Pheonix Solutions","description":"We Empower Your Business Growth","publisher":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/pheonixsolutions.com\/blog\/#organization","name":"PheonixSolutions","url":"https:\/\/pheonixsolutions.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/logo.png","contentUrl":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/logo.png","width":454,"height":300,"caption":"PheonixSolutions"},"image":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/","https:\/\/x.com\/pheonixsolution"]},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/person\/0ffa33d73c869faec2d50e79c24e3503","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g","caption":"admin"},"sameAs":["http:\/\/blog.pheonixsolutions.com"],"url":"https:\/\/pheonixsolutions.com\/blog\/author\/admin\/"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p7F4uM-2b","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=135"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/135\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}