Re: Configuration question about a domain list for a http.req.host comparaison

2009-02-13 Thread Damien Desmarets
Tollef Fog Heen a écrit :
> ]] Damien Desmarets 
>
> | I have 1 question for you. I haven't found the response in the
> | documentation/wiki. I think you have a big job to wrtie a good
> | documentation ... the current is really poor !
>
> If you want to help out with writing docs or suggest weak points, you
> are more than welcome.
>   
Yes of course, but to begin I need a good documentation to have "solids
foundations"!
And after this, be sure i will post modification/add in your wiki
documentation.
> | Is it possible to do this in VCL origin configuration?
>
> Not at the moment, no.  What I would suggest is you write a small script
> in your favourite language that generates the VCL for you.
>
>   
Yes sure, and modify the init.d script ... or I can try to add this
particularity inside libvcl directly. I'm going to see the difficulty to
implement this.

Thank for the support,
Damien Desmarets
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Configuration question about a domain list for a http.req.host comparaison

2009-02-10 Thread Tollef Fog Heen
]] Damien Desmarets 

| I have 1 question for you. I haven't found the response in the
| documentation/wiki. I think you have a big job to wrtie a good
| documentation ... the current is really poor !

If you want to help out with writing docs or suggest weak points, you
are more than welcome.

| Is it possible to do this in VCL origin configuration?

Not at the moment, no.  What I would suggest is you write a small script
in your favourite language that generates the VCL for you.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Configuration question about a domain list for a http.req.host comparaison

2009-02-09 Thread Poul-Henning Kamp
In message <49906d31.70...@zaide.org>, Damien Desmarets writes:

>The regex comparison is very big with maybe 100 domains. 

Presently we have no better mechanism.


-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Configuration question about a domain list for a http.req.host comparaison

2009-02-09 Thread Damien Desmarets
Hello,
I have 1 question for you. I haven't found the response in the
documentation/wiki. I think you have a big job to wrtie a good
documentation ... the current is really poor !

So the question.
I have a list of differents domains:
azeazeaze.com
eruigeiogr.com
zezeirjiorf.com
...

My configuration file is actually like this:
if (req.http.host ~
"^(azeazeaze.com|eruigeiogr.com|zezeirjiorf.com|...)$") {
set req.backend = principal_delivery;
} elsif (req.http.host ~
"^(aazeazeazeaze.com|azeiazjeaioze.com|azejoazjeaiozejoaz.com|...)$") {
set req.backend = pictures_delivery;
} else {
error 403 "Not supported"
}

The regex comparison is very big with maybe 100 domains. It's not clear
inside my file, and difficult to made change.
Is it possible to include those domains in a list and match this list to
the req.http.host. Like this maybe:

#define DOMAINS_PRINCIPAL_LIST "domains_principal_list.txt"
#define DOMAINS_PICTURES_LIST "domains_pictures_list.txt"

if (req.http.host ~ DOMAINS_PINCIPAL_LIST) {
set req.backend = principal_delivery;
} elsif (req.http.host ~ DOMAINS_PICTURES_LIST) {
set req.backend = pictures_delivery;
} else {
error 403 "Not supported"
}

I know the constant don't contain regex valid content but it's a
pseudo-code to show you the idea.

And my file "domains_principal_list.txt" contains for exemple:
azeazeaze.com
eruigeiogr.com
zezeirjiorf.com

Is it possible to do this in VCL origin configuration?

Thank for your help.

Regards,
Damien Desmarets

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc