• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Question basic question nginx proxy with apache

gijsbert

Basic Pleskian
I am in the process of implementing nginx as front-end proxy and keep using apache. We see a lot of queries we would like to block. 2 Examples of things we see in our Apache access-logs:

GET /liquids/coopervision-biomedics-all-in-one-flight-pack/1111111111111%22%20UNION%20SELECT%20CHAR(45,120,49,45,81,45),CHAR(45,120,50,45,81,45),CHAR(45,120,51,45,81,45),CHAR(45,120,52,45,81,45),CHAR(45,120,53,45,81,45)%20--%20/*%20order%20by%20%22as%20/*

GET /bijproducten/alpine-hearing-protection-partyplug/%22%20or%20(1,2)=(select*from(select%20name_const(CHAR(101,99,121,73,79,102,68,81,121,66,117,89),1),name_const(CHAR(101,99,121,73,79,102,68,81,121,66,117,89),1))a)%20--%20%22x%22=%22x/

I actually have 2 questions:

1) In which nginx-config file can I add filter rules so they work server-wide. If I chech the nginx-configuration, in most files I see "DO NOT MODIFY" as they are generated by plesk.

2) Can anyone help me with an example (regex) of blocking these kind of requests with nginx before they reach apache. For example a filter rule that block requests containing the string "UNION%20SELECT%20CHAR(45" or "select%20name_const(CHAR"

Any help will be appreciated.

Gijsbert
 
Back
Top