Re: [users@httpd] Apache VirtualHost Config Tool management
On Thu, 2023-04-27 at 12:53 +0200, Carlos García Gómez wrote: > Hello, > > I am looking for a tool that makes it easier for me to manage the all > virtual hosts that I have configured. > > Some tool that allows me to have a database of all the virtual hosts > and that allows me to edit their configuration at any given time. > > Is there anything implemented in LDAP, MySQL or some library that > allows me to parse the configuration and edit it with some frontend? > > I know I'm looking for something complicated but thanks for your > comments There are several modules that come with Apache httpd for simplifying vhost config without introducing any third-party tools. What I personally use is mod_macro to define a standard vhost layout, and then all I need in my main configuration file is: Use VHostMacro domainnamehere.com Documentation here: https://httpd.apache.org/docs/2.4/mod/mod_macro.html along with an example of how you'd use this for vhosts. Another option is mod_vhost_alias - https://httpd.apache.org/docs/2.4/mod/mod_vhost_alias.html - I'm not a big fan, but some people like it. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Meaning of RewriteRules in adjacent sections
On Fri, 2023-01-20 at 15:05 +1100, Richard Walker wrote: > Comment #1: in the text, the three occurrences of "RewriteOptions" > are linked to an incorrect URL > ( https://httpd.apache.org/docs/2.4/mod/rewrite.html#rewriteoptions > instead of > https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html#rewriteoptions > ). Fixed in r1906839 in Trunk. Thank you. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] RewriteCond - is this fast fail?
On Wed, 2023-01-11 at 10:33 -0500, rbo...@rcbowen.com wrote: > On Wed, 2023-01-11 at 10:26 -0500, rbo...@rcbowen.com wrote: > > On Wed, 2023-01-11 at 10:15 -0500, rbo...@rcbowen.com wrote: > > > On Wed, 2023-01-11 at 13:12 +, sebb wrote: > > > > Thanks, that's very helpful. > > > > > > > > Maybe this info could be added to the user docs? > > > > > > There's a useful flow diagram that shows this: > > > > > > https://httpd.apache.org/docs/current/rewrite/intro.html > > > > > > Granted, I'm sure it could be made clearer and/or more explicit. > > > > > > How's this: > > Committed in r1906605 in trunk. I'll put that in the 2.4 docs also in > a > moment. In 2.4 docs in r1906607. Thanks for driving this improvement. --Rich - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] RewriteCond - is this fast fail?
On Wed, 2023-01-11 at 10:26 -0500, rbo...@rcbowen.com wrote: > On Wed, 2023-01-11 at 10:15 -0500, rbo...@rcbowen.com wrote: > > On Wed, 2023-01-11 at 13:12 +, sebb wrote: > > > Thanks, that's very helpful. > > > > > > Maybe this info could be added to the user docs? > > > > There's a useful flow diagram that shows this: > > > > https://httpd.apache.org/docs/current/rewrite/intro.html > > > > Granted, I'm sure it could be made clearer and/or more explicit. > > > How's this: Committed in r1906605 in trunk. I'll put that in the 2.4 docs also in a moment. > > [rbowen@avistetto:manual/mod]$ svn diff > > Index: mod_rewrite.xml > === > --- mod_rewrite.xml (revision 1906604) > +++ mod_rewrite.xml (working copy) > @@ -1059,6 +1059,13 @@ > the homepage is served. Otherwise, the standard page is > served. > > > + By default, multiple RewriteConds > + are evaluated in sequence with an implied logical > AND. > + If a condition fails, in the absence of an > + OR flag, the entire ruleset is > abandoned, > + and further conditions are not evaluated. > + > + > > > > > - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] RewriteCond - is this fast fail?
On Wed, 2023-01-11 at 10:15 -0500, rbo...@rcbowen.com wrote: > On Wed, 2023-01-11 at 13:12 +, sebb wrote: > > Thanks, that's very helpful. > > > > Maybe this info could be added to the user docs? > > There's a useful flow diagram that shows this: > > https://httpd.apache.org/docs/current/rewrite/intro.html > > Granted, I'm sure it could be made clearer and/or more explicit. How's this: [rbowen@avistetto:manual/mod]$ svn diff Index: mod_rewrite.xml === --- mod_rewrite.xml (revision 1906604) +++ mod_rewrite.xml (working copy) @@ -1059,6 +1059,13 @@ the homepage is served. Otherwise, the standard page is served. +By default, multiple RewriteConds +are evaluated in sequence with an implied logical AND. +If a condition fails, in the absence of an +OR flag, the entire ruleset is abandoned, +and further conditions are not evaluated. + + - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] RewriteCond - is this fast fail?
On Wed, 2023-01-11 at 13:12 +, sebb wrote: > Thanks, that's very helpful. > > Maybe this info could be added to the user docs? There's a useful flow diagram that shows this: https://httpd.apache.org/docs/current/rewrite/intro.html Granted, I'm sure it could be made clearer and/or more explicit. > > > RewriteRule is evaluated first. If that matches, the RewriteCond > > > directives are evaluated one at a time. If a condition fails, and > > > there > > > is no [OR] flag, then the evaluation stops and does not continue > > > to the > > > next RewriteCond > > > > > > This is defined in > > > https://github.com/apache/httpd/blob/trunk/modules/mappers/mod_rewrite.c#L4230 > > > and onwards. > > > > FWIW, this is also why %N is only available in the substitution > > argument, and not in the pattern argument of a RewriteRule, as %N > > hasn't > > been defined at the pattern matching point of a RewriteRule. > > > > > > > > > > > > > > On Tue, Jan 10, 2023 at 6:28 PM sebb > > > > > wrote: > > > > > > > > > > > > On Tue, 10 Jan 2023 at 23:21, Frank Gingras > > > > > > wrote: > > > > > > > > > > > > > > The implicit behaviour for multiple RewriteCond > > > > > > > directives is AND, > > > > > > > unless you use [OR]. > > > > > > > > > > > > Yes, that is documented. > > > > > > > > > > > > > So without [OR], all the conditions have to match to > > > > > > > apply the > > > > > > > rewrite rule. > > > > > > > > > > > > Yes, but are any subsequent conditions evaluated? > > > > > > > > > > > > > On Tue, Jan 10, 2023 at 6:06 PM sebb > > > > > > > wrote: > > > > > > > > > > > > > > > > Does the first RewriteCond that fails cause any > > > > > > > > following RewriteCond > > > > > > > > entries to be skipped? > > > > > > > > (up to the RewriteRule) > > > > > > > > > > > > > > > > I would hope that is the case, but AFAICT it is not > > > > > > > > explicitly > > > > > > > > stated. > > > > > > > > > > > > > > > > If it is the case, perhaps it would be worth making > > > > > > > > explicit? > > > > > > > > (and suggesting that the cheapest checks are done > > > > > > > > first). > > > > > > > > > > > > > > > > Sebb > > > > > > > > > > > > > > > > --- > > > > > > > > -- > > > > > > > > To unsubscribe, e-mail: > > > > > > > > users-unsubscr...@httpd.apache.org > > > > > > > > For additional commands, e-mail: > > > > > > > > users-h...@httpd.apache.org > > > > > > > > > > > > > > > > > > > > --- > > > > > > -- > > > > > > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > > > > > > For additional commands, e-mail: > > > > > > users-h...@httpd.apache.org > > > > > > > > > > > > > > --- > > > > -- > > > > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > > > > For additional commands, e-mail: users-h...@httpd.apache.org > > > > > > > > > > > > > - > > > > > > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > > > For additional commands, e-mail: users-h...@httpd.apache.org > > > > > > > > > --- > > -- > > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > > For additional commands, e-mail: users-h...@httpd.apache.org > > > > - > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org > > > On Wed, 11 Jan 2023 at 12:18, Daniel Gruno > wrote: > > > > On 2023-01-11 13:16, Daniel Gruno wrote: > > > On 2023-01-11 12:58, sebb wrote: > > > > On Tue, 10 Jan 2023 at 23:33, Frank Gingras > > > > wrote: > > > > > > > > > > Do a quick test, and enable the rewrite log. Make sure you > > > > > use a log > > > > > level of 5 to see those details. > > > > > > > > Whilst the test might be quick, setting it up is not. > > > > > > > > Does no-one here know the answer? > > > > > > RewriteRule is evaluated first. If that matches, the RewriteCond > > > directives are evaluated one at a time. If a condition fails, and > > > there > > > is no [OR] flag, then the evaluation stops and does not continue > > > to the > > > next RewriteCond > > > > > > This is defined in > > > https://github.com/apache/httpd/blob/trunk/modules/mappers/mod_rewrite.c#L4230 > > > and onwards. > > > > FWIW, this is also why %N is only available in the substitution > > argument, and not in the pattern argument of a RewriteRule, as %N > > hasn't > > been defined at the pattern matching point of a RewriteRule. > > > > > > > > > > > > > > On Tue, Jan 10, 2023 at 6:28 PM sebb > > > > > wrote: > > > > > > > > > > > > On Tue, 10 Jan 2023 at 23:21, Frank Gingras > > > > > > wrote: > > > > > > > > > > > > > > The implicit behaviour for mul