Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Deny host to 403 Page with PHP

$
0
0
Hello all,

I've setup a webserver with NGINX and PHP-FPM.
Everything is working correctly except for this.

I have a list of IP's that I block.
I want the 'bad hosts' (blocked IP's) to be redirected to a 403 page.

Unfortunately the PHP on the page doesn't get executed.
(Its supposed to echo back the IP address where the user is connecting from).

Any idea on how I can fix this?

Thanks!

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>