• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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