Dynamic Subdomain Configuration

Edho Arief edho at myconan.net
Tue Feb 21 01:10:40 UTC 2012


On Tue, Feb 21, 2012 at 7:18 AM, justin <nginx-forum at nginx.us> wrote:
> Actually, I think I found how to set the 404:
>
> location ~ \.php$ {
>  if (!-f $document_root/$fastcgi_script_name) {
>    log_not_found off;
>    return 404;
>  }
>
>  include /etc/nginx/fastcgi_params;
>  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
>  fastcgi_intercept_errors off;
>  fastcgi_pass php1.local.pagelines.com:9000;
> }
>
> But I can't use log_not_found off, getting an error about the ability to
> use this in the location. Basically, I don't want an error logged if
> somebody types:
>

Try

try_files $uri =404;

-- 
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org



More information about the nginx mailing list