8 messages in ru.sysoev.nginxRe: nginx-0.7.27
FromSent OnAttachments
Igor SysoevDec 15, 2008 3:31 am 
Igor SysoevDec 15, 2008 3:32 am 
Kevin WorthingtonDec 15, 2008 5:42 am 
Marcos NevesDec 15, 2008 6:04 am 
Igor SysoevDec 15, 2008 6:29 am 
Marcos NevesDec 15, 2008 6:39 am 
Igor SysoevDec 15, 2008 6:51 am 
Marcos NevesDec 15, 2008 7:05 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: nginx-0.7.27Actions...
From:Igor Sysoev (is@rambler-co.ru)
Date:Dec 15, 2008 6:51:53 am
List:ru.sysoev.nginx

On Mon, Dec 15, 2008 at 12:39:57PM -0200, Marcos Neves wrote:

try_files will be very usefu!! Can it be used outside location context?

No, currently it can be use inside location only. How do you want to use it in server context ?

2008/12/15 Igor Sysoev <is@rambler-co.ru>:

On Mon, Dec 15, 2008 at 12:04:45PM -0200, Marcos Neves wrote:

Where can I found examples about how to use try_files and variables support in the "fastcgi_pass" directive?

fastcgi_pass variable usage (just demonstration):

location \.php$ { resolver 127.0.0.1; set $backend back1:9000; fastcgi_pass $backend; }

back1 will be resolved using named server on 127.0.0.1. You may also describe back1 upstream to disable onfly resolution:

upstream back1 { server 192.168.1.1:9000; }

server {

location \.php$ { set $backend back1; fastcgi_pass $backend; }

or just use IP address:

location \.php$ { set $backend 192.168.1.1:9000; fastcgi_pass $backend; }

try_files:

Mongrel:

location / { try_files /system/maintenance.html $uri $uri/index.html $uri.html @mongrel; }

location @mogrel { proxy_pass http://mongrel; }

Drupal/FastCGI:

location / { try_files $uri @drupal; }

location ~ \.php$ { try_files $uri @drupal;

fastcgi_param SCRIPT_FILENAME /path/to/$uri; ... other fastcgi_param }

location = @drupal { fastcgi_pass ...;

fastcgi_param SCRIPT_FILENAME /path/to/index.php; fastcgi_param QUERY_STRING q=$request_uri;

... other fastcgi_param }

Joomla/FastCGI:

location / { try_files $uri @joomla; }

location ~ \.php$ { try_files $uri @joomla;

fastcgi_param SCRIPT_FILENAME /path/to/$uri; ... other fastcgi_param }

location = @joomla { fastcgi_pass ...;

fastcgi_param SCRIPT_FILENAME /path/to/index.php;

... other fastcgi_param }