I want to put a condition in my apache config that if a request comes from a specific IP then load a particular config file. Is this possible?
E.g.
if (192.168.1.1)
Include conf/mod_security.conf
I want to put a condition in my apache config that if a request comes from a specific IP then load a particular config file. Is this possible?
E.g.
if (192.168.1.1)
Include conf/mod_security.conf
You can't choose to include a configuration file within your apache configuration based on the visitor. This is because apache compiles all of the configuration data as soon as it starts. You can make adjustments like mod_rewrite rules based on the visitor's IP, or you can utilize mod_access.
Apache's "include" directive is only valid within the main configuration, or contexts. There's a bunch of documentation available on that directive.