Dear, disabling the firewall solved the 403 error problem. I think this error originated from the complexity of the SQL query sent.
This is the query I sent in the $.ajax url:
./php/consultasql.php?seleccion=SELECT siscoorgeodesicas.*,datumhor.nombre AS nombre_datumhor,elipsoides.nombre As nombre_elipsoide, uso.nombre AS nombre_uso,uso.lat1 AS ulat1,uso.lon1 AS ulon1,uso.lat2 AS ulat2,uso.lon2 AS ulon2 FROM siscoorgeodesicas JOIN datumhor ON siscoorgeodesicas.datumhor=datumhor.codigo JOIN elipsoides ON datumhor.elipsoide=elipsoides.codigo JOIN uso ON siscoorgeodesicas.uso = uso.codigo WHERE siscoorgeodesicas.codigo = 'CAMPO INCH_coordinate_system'
This is a Log entry with the query that caused the 403 error:
179.62.90.252 - - [03/Jul/2024:13:53:42 +0200] "GET /php/consultasql.php?seleccion=SELECT%20elipsoides.linuni,primeridiano.anguni%20FROM%20siscoorgeodesicas
%20JOIN%20datumhor%20on%20datumhor.codigo=siscoorgeodesicas.datumhor%20JOIN%20elipsoides%20ON%20elipsoides.codigo=datumhor.elipsoide%20JOIN%20primeridiano%20on%20primeridiano.codigo=datumhor.priMeridiano%20WHERE%20siscoorgeodesicas.codigo=%274172%27 HTTP/1.1" 403 548 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
I hope this information is useful for you to review the WAF rules.
Thank you