location /customer1 {
...
include "/etc/nginx/customer1.rules";
...
}
location /customer2 {
...
include "/etc/nginx/customer2.rules";
...
}
It should work but as we're talking about hundred of customer, it will be a mess to manage.
And I'm not sure this will not have perfomances impact on nginx.
Anybody got an idea on a simplier way to workaround the problem ?
Thanks
Hi,
If you can't factorize on NAXSI rules because websites are behaving differently then your problem is only how to ease hundreds of websites management.
First you can use Nginx include statement so you can include dites-enabled.d directory structure like in Apache. Meaning you can have a single location file for every virtualhost and ease its maintenance together with your configuration management system.
Cheers
Didier
CUSTOMER1
BasicRule wl:1000 "mz:$URL:/CUSTOMER1/headers/wnf.asp|$ARGS_VAR|NAME"; BasicRule wl:1000 "mz:$URL:/core/CUSTOMER1/fulltextsearch/main.do|$ARGS_VAR|NAME";
CUSTOMER2
BasicRule wl:1000 "mz:$URL:/CUSTOMER2/headers/wnf.asp|$ARGS_VAR|NAME"; BasicRule wl:1000 "mz:$URL:/core/CUSTOMER2/fulltextsearch/main.do|$ARGS_VAR|NAME";
So rules will always be the same except the customer alias name.
I'll do the 1 location per customer solution, don't see other way to do it.
Thanks for your advices !