Welcome! Log In Create A New Profile

Advanced

Re: Client body buffering with FastCGI

February 18, 2011 08:48AM
On Fri, Feb 18, 2011 at 07:43:09AM -0500, Maxim Khitrov wrote:

> http
> {
> include mime.types;
> sendfile on;
>
> server
> {
> listen 80 accept_filter=httpready;
> server_name localhost;
> root /srv/upload/ajaxplorer;
> client_max_body_size 256m;
>
> location = / {
> rewrite ^ /index.php last;
> }
>
> location ~ ^/(?:index|content)\.php$ {
> fastcgi_pass unix:/tmp/php.sock;
> fastcgi_param SCRIPT_FILENAME $request_filename;
> include fastcgi_params;
> }
>
> location / { deny all; }
> location /client/ { allow all; }
> location /client/html/ { deny all; }
> location /plugins/ { allow all; }
> location ~* \.php$ { deny all; }
> }
> }

BTW, it's better to not use regex at all:

location = / {
fastcgi_pass unix:/tmp/php.sock;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
include fastcgi_params;
}

location = /index.php {
fastcgi_pass unix:/tmp/php.sock;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}

location = /content.php {
fastcgi_pass unix:/tmp/php.sock;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}


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

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

Client body buffering with FastCGI

Maxim Khitrov February 17, 2011 09:56AM

Re: Client body buffering with FastCGI

Maxim Dounin February 17, 2011 12:08PM

Re: Client body buffering with FastCGI

Maxim Khitrov February 17, 2011 01:52PM

Re: Client body buffering with FastCGI

Igor Sysoev February 17, 2011 02:42PM

Re: Client body buffering with FastCGI

Maxim Khitrov February 17, 2011 02:42PM

Re: Client body buffering with FastCGI

Igor Sysoev February 17, 2011 02:48PM

Re: Client body buffering with FastCGI

Maxim Khitrov February 17, 2011 02:50PM

Re: Client body buffering with FastCGI

Maxim Dounin February 17, 2011 02:58PM

Re: Client body buffering with FastCGI

Maxim Khitrov February 18, 2011 07:46AM

Re: Client body buffering with FastCGI

Igor Sysoev February 18, 2011 08:48AM

Re: Client body buffering with FastCGI

Maxim Dounin February 18, 2011 10:32AM

Re: Client body buffering with FastCGI

Maxim Khitrov February 18, 2011 03:22PM

Re: Client body buffering with FastCGI

Maxim Dounin February 18, 2011 05:42PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 208
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