# mod\_security instaled but not working :(

**URL:** <https://forum.virtualmin.com/t/mod-security-instaled-but-not-working/31428>\
**Category:** Help! (Home for newbies)\
**Created:** [January 1, 2009, 10:45am UTC](https://forum.virtualmin.com/t/mod-security-instaled-but-not-working/31428 "2009-01-01T10:45:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_IceBurn](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/_/ea5d25/32.png) [@\_IceBurn](https://forum.virtualmin.com/u/_IceBurn)\
**Post date:** [January 1, 2009, 10:45am UTC](https://forum.virtualmin.com/t/mod-security-instaled-but-not-working/31428/1 "2009-01-01T10:45:32Z")

</div>

Hi all!

I’m using virtualmin and I have apache mod\_security installed, but after I made a few tests I realize that it was not working because it was not blocking URL’s queries that it should block.

How can I force mod\_rewrite to work on all servers and sub-servers?

Please, as you may guess, I have some urgency getting this to work, please help!

Thanks in advance and Happy New Year!!\<br\>\<br\>Post edited by: =IceBurn=, at: 2009/01/01 04:46

---

<div class="post-metadata">

**Author:** ![Eric](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/e/898d66/32.png) [@Eric](https://forum.virtualmin.com/u/Eric)\
**Post date:** [January 2, 2009, 12:46am UTC](https://forum.virtualmin.com/t/mod-security-instaled-but-not-working/31428/2 "2009-01-02T00:46:39Z")

</div>

Howdy,

Well, if you’re stuck on how to get mod\_security working, the community there may be able to help you get that up and running. There’s some info here:

[http://www.modsecurity.org/contact/index.html](http://www.modsecurity.org/contact/index.html)

I unfortunately don’t have much experience with it.

As for how to apply mod\_rewrite to all Virtual Servers?

It appears that you can just add mod\_rewrite content into your main Apache config, and that applies to the various Virtual Servers.

For example, on my Ubuntu system, I edited /etc/apache2/apache2.conf (this would be /etc/httpd/conf/httpd.conf on RHEL/CentOS), and I added this to the end:

[code:1]  
RewriteEngine on  
RedirectMatch /foobar [https://mydomain.com/itworks.html](https://mydomain.com/itworks.html)  
[/code:1]

And then, for any domain on the system – if I go there, and add /foobar to the end of the URL, I’m redirected to the itworks.html page.  
-Eric

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [April 30, 2020, 5:31am UTC](https://forum.virtualmin.com/t/mod-security-instaled-but-not-working/31428/3 "2020-04-30T05:31:06Z")

</div>

Closed on April 30, 2020, 5:31am UTC


