Reputation: 131
I wish to disable a module only in one vhost ?
How I can set it in my vhost declaration, if that's possible ?
Upvotes: 1
Views: 560
Reputation: 328
The Apache modules are loaded server-wide, so you cannot disable them by vhost. But depending on the module, you can configure it to do nothing by putting the right directives inside the vhost config. For example, this can be used for mod_security
and mod_rewrite
.
<VirtualHost *:80>
ServerName example.com
# mod_security
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
# mod_rewrite
<IfModule mod_rewrite.c>
RewriteEngine off
</IfModule>
</VirtualHost>
Upvotes: 0