Welcome! Log In Create A New Profile

Advanced

Block certain extensions preferably across virtual hosts

November 08, 2010 03:36AM
I have been working on converting from apache to nginx and I have a rule

RewriteRule \.(asp|aspx|php|jsp)$ - [F,L]

to block all of those. What would be the best way to convert that to nginx and is there a way to do it in one place so that all
virtualhosts share it?

If I could put that in one place so it applies to everything I serve with nginx it would be much easier to add other things to it over time. Mostly I want to completely block many extensions since it makes analyzing errors much simpler.

Thanks
Subject Author Posted

Block certain extensions preferably across virtual hosts

kosh November 08, 2010 03:36AM

Re: Block certain extensions preferably across virtual hosts

Igor Sysoev November 08, 2010 06:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 108
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready