Welcome! Log In Create A New Profile

Advanced

Re: Generating redirects to internal named locations

Dave Hayes
August 10, 2011 02:30AM
Alexandr Gomoliako <zzz@zzz.org.ua> writes:
> On 8/8/11, Dave Hayes <dave@jetcafe.org> wrote:
>> If I have several location blocks in a server block, and I want to use
>> just one location block that has my fastcgi definitions for perl (hence
>> @perl), are you recommending I just duplicate all the configuration
>> in each location block that needs to redirect to perl?
>> Did I get that right? :)
> Yes, you got that right :)
> Avoiding abstractions is a good thing here. Less likely to stumble on
> a bug, easier to read later, etc.

Interesting. I would like to learn more about why you think this is a
best practice. Please don't misread, this is not a criticism. I am quite
curious about any new way of thinking that goes exactly opposite to
established ideas.

In this case, many software developers will tell you that factoring out
common lines of configuration as I have suggested prevents bugs and is
easier to read.

In my example above, if I misconfigure the perl section, I only have to
fix it in one place. If I do it the way you suggest, pasting that
configuration into 20 different location blocks, I have to fix any
configuration bug in 20 places. If I change one location slightly,
it may be hard to spot that there's a bug in that location.

Maybe I am misunderstanding your rationale? :)
--
Dave Hayes - Consultant - Altadena CA, USA - dave@jetcafe.org
>>> The opinions expressed above are entirely my own <<<

"Every extreme attitude is a flight from the self."
-- Eric Hoffer




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

Generating redirects to internal named locations

Dave Hayes August 07, 2011 05:20PM

Re: Generating redirects to internal named locations

Alexandr Gomoliako August 07, 2011 06:08PM

Re: Generating redirects to internal named locations

Dave Hayes August 07, 2011 11:58PM

Re: Generating redirects to internal named locations

Alexandr Gomoliako August 08, 2011 12:36PM

Re: Generating redirects to internal named locations

Dave Hayes August 10, 2011 02:30AM

Re: Generating redirects to internal named locations

Paul Findlay August 10, 2011 07:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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