Welcome! Log In Create A New Profile

Advanced

Re: Segfault in 1.0.5.

António P. P. Almeida
July 23, 2011 10:46AM
On 23 Jul 2011 15h09 WEST, gmm@csdoc.com wrote:

>
> sorry, all my previous messages in this thread was with errors.
>
> Igor, likely nginx now need something like httpd mod_macro
> to eliminate multiple duplicates of small config fragments

Hello Gena,

I followed the discussion on the russian ML. Yes something like your
use suggestion would be great.

> On 23.07.2011 12:20, Igor Sysoev wrote:
>
>> location / {
>> expires 30d;
>> error_page 404 = @joomla;
>> log_not_found off;
>> }
>>
>> location ~ ^/(images|cache|media)/ {
>> # static
>> }
>
> probably, this is most correct and most performance-optimized,
> (both - server-side and client-side) fragment of nginx config:
>
> - location ~ ^/(images|cache|media)/ {
> - # static
> - }
>
> + location ^~ /images/ {
> + # static
> + expires 30d;
> + error_page 404 = @joomla;
> + log_not_found off;
> + }
> +
> + location ^~ /cache/ {
> + # static
> + expires 30d;
> + error_page 404 = @joomla;
> + log_not_found off;
> + }
> +
> + location ^~ /media/ {
> + # static
> + expires 30d;
> + error_page 404 = @joomla;
> + log_not_found off;
> + }
> +

Wouldn't the use of try_files be preferable to error_page?

- error_page 404 = @joomla;
+ try_files $uri $uri/ @joomla;

From the little I know, try_files does a stat() call while error_page
is a special response. They both do an internal redirection. They run
on different phases. Is this correct? If so is there any rule of thumb
for deciding when to use try_files vs. error_page 404.

Thanks,
--- appa


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

Segfault in 1.0.5.

Nigel Cunningham 1980 July 23, 2011 01:38AM

Re: Segfault in 1.0.5.

Maxim Dounin 805 July 23, 2011 03:02AM

Re: Segfault in 1.0.5.

Nigel Cunningham 844 July 23, 2011 04:52AM

Re: Segfault in 1.0.5.

Igor Sysoev 886 July 23, 2011 05:22AM

Re: Segfault in 1.0.5.

Igor Sysoev 957 July 23, 2011 05:30AM

Re: Segfault in 1.0.5.

Nigel Cunningham 773 July 23, 2011 05:40AM

Re: Segfault in 1.0.5.

Gena Makhomed 852 July 23, 2011 09:50AM

Re: Segfault in 1.0.5.

Gena Makhomed 889 July 23, 2011 09:52AM

Re: Segfault in 1.0.5.

Gena Makhomed 789 July 23, 2011 10:10AM

Re: Segfault in 1.0.5.

António P. P. Almeida 787 July 23, 2011 10:46AM

use

Gena Makhomed 726 July 23, 2011 12:18PM

Re: use

António P. P. Almeida 768 July 23, 2011 02:16PM

Re: use

Gena Makhomed 720 July 23, 2011 02:48PM

Re: use

António P. P. Almeida 765 July 23, 2011 03:46PM

Re: use

Gena Makhomed 739 July 23, 2011 04:50PM

Re: use

António P. P. Almeida 756 July 23, 2011 10:26PM

Re: use

Gena Makhomed 696 July 24, 2011 09:38AM

Re: use

Alexandr Gomoliako 775 July 23, 2011 05:30PM

Re: use

Akins, Brian 996 July 25, 2011 02:42PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 181
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