server_name & redirect

Christophe de Kerviler kerviler at
Fri Jul 25 20:21:31 MSD 2008


I would like to have multiple domains on nginx to manage images. If one 
image is not available, I redirect to a php processing the image. On the 
next call the image will be available.

My conf looks like this:

 server {
        listen       80;

and this something like this:

if (! -f  $myimagefile) {
    rewrite /process.php?param=some_parameters redirect;

My problem is if I call and if the image is not there, 
I'am redirected to
instead of

The first domaine behind "server_name". Is there a solution for that, or 
a work around?

Thanks a lot.


More information about the nginx mailing list