Named location explicit config

Igor Clark igor at
Mon Sep 22 17:13:18 MSD 2008

Hi Denis,

On 22 Sep 2008, at 12:48, Denis F. Latypoff wrote:

>>> Is it possible to route specific types directly to a named location
>>> without using error_page?
> no

OK, thanks for the information.

Is there another way to do what I'm trying to do though? I have this  

	location / {
		error_page 404 = @phpapp;

	location @phpapp {
		proxy_pass	http://x.x.x.x;
		proxy_set_header	... # etc

so that dynamic stuff which isn't found is routed to Apache (some PHP  
code relies on some Apache features).

But I don't want to have to duplicate all the proxy stuff inside  
(an)other location block(s).

I could put it in an include, but it would be nice to be able to do it  
in config directly somehow.


Igor Clark • POKE • 10 Redchurch Street • E2 7DD • +44 (0)20 7749 5355  

More information about the nginx mailing list