Welcome! Log In Create A New Profile

Advanced

Re: Stupid question

Maxim Dounin
April 13, 2010 04:36PM
Hello!

On Tue, Apr 13, 2010 at 08:38:09PM +0100, Nuno Magalhães wrote:

> I have this config:

[...]

> location ~ \.(php|html)$ {
> fastcgi_pass localhost:1234;

[...]

> }
>
> error_page 404 403 /40x.html;
> location = /40x.html {
> root /var/www/nginx-default/site/epages;
> }
> }
>
> All my files are .html. Any regular page will have its php parsed, but
> all error pages will only parse html. I.e., if i have this code:
>
> <html><head></head><body>
> error <?php echo '404'; ?>
> </body></html>
>
> The php will be parsed if it's not an error page. What am i missing here?

You have fastcgi_pass to php for .html files, but not for
/40x.html. See here for details:

http://wiki.nginx.org/NginxHttpCoreModule#location

Maxim Dounin

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

Stupid question

vesperto April 13, 2010 03:42PM

Re: Stupid question

Maxim Dounin April 13, 2010 04:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 307
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready