Welcome! Log In Create A New Profile

Advanced

Re: Single php file location match

March 05, 2010 03:18AM
On Thu, Mar 04, 2010 at 11:34:19PM -0500, drewrockshard wrote:

> How would I go about running a PHP file that is only matched by the request of that file? Meaning, how can someone request a file and nginx run this configuration ONLY when this PHP file is requested.
>
> Here is what I have so far:
>
>
> location / {
> root /www/default/;
> try_files $uri $uri/ /index.php?q=$uri&$args;
> index index.php;
> }
>
> location /status.php {
> #allow 192.168.1.0/24;
> deny all;
> #allow all;
> root /www/default/;
> try_files $uri $uri/ /index.php?q=$uri&$args;
> index status.php;
> }
>
>
> Basically, I'll be setting up rules to only allow a local network request, but only for status.php. So how do I go about allowing this one network to status.php?

location = /status.php {
#allow 192.168.1.0/24;
deny all;
#allow all;
root /www/default/;
fastcgi_pass ...
include fastcgi.conf;
}


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Single php file location match

drewrockshard March 04, 2010 11:34PM

Re: Single php file location match

Igor Sysoev March 05, 2010 03:18AM

Re: Single php file location match

drewrockshard March 05, 2010 08:23AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 149
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready