URL filtering to the apache reverse proxy via 80 and 443 port forwarding
-
Hi,
I have a pf-sense 2.7 installed and a Apache web server running in Ubuntu 22.04 VM which is under pf-sense LAN network, and port forwarding is done for 80 and 443 to a internal VM's port 80 and 443, I have an automated script where weekly many number of Apache subdomain virtual hosts are created and deleted, and URL's are globally accessible.
ex: websites: example.com, app1.example.com, app2.example.com
**My requirement is **if a non valid subdomain (ex: xyz.example.com) request comes to Apache it should block immediately without serving any SSL certificate, since Apache doesn't have this feature, and it serves default main domain's SSL certificate which browsers show SSL warning (SSL_ERROR_BAD_CERT_DOMAIN), and I want to completely block that request, how can i achieve this with pf-sense so that only whitelisted url's , probably in a file list should allow to reach Apache's 80 and 443 port?.