'T is part of a big if elif elif elif elif else clause for host-name
based virtual hosting. Many of these hosts have peculiar, specific
configuration tweaks, so using a vhost lighttpd module is no good for
me. Lighttpd configuration looks like this:
if $HTTP[...] ... {
...
} else ... {
...
}
Peace!
Greetings,
Hraban Luyat
On Tue, Oct 20, 2009 at 08:39 -0700, KenCorey wrote:
>
> Hrm...that's interesting. What's the 'else' clause a part of? What's
> processing this file that can handle if/then/else? I get errors if I
> try to put an 'if' in.
>
> I have my mod.redirect rules in the standard 10-fastcgi.conf file.
>
> -Ken
>
> Hraban Luyat wrote:
> > You can match that hostname with `== "clicksafety.co.uk"' in Lighttpd.
> >
> > Regarding your problem: that is strange, when you make Lighttpd redirect
> > it does not do anything with web.py at all, it does not even know if the
> > URL is legal. I do the same for all my domains, but the other way
> > around: no www. Here is an excerpt from my config file:
> >
> > # BEGIN NOPHILOSOPHY
> > } else $HTTP["host"] == "www.nophilosophy.com" {
> > url.redirect = ("^/(.*)$" => "http://nophilosophy.com/$1" )
> > } else $HTTP["host"] == "nophilosophy.com" {
> > server.document-root = "/a/boao/home/emilia/nophilosophy.com/static"
> > fastcgi.server = ( "/" =>
> > (( "bin-path" =>
> > "/a/boao/home/emilia/nophilosophy.com/code.py",
> > "socket" => "/tmp/fastcgi-py-nophilosophy.com.socket",
> > "check-local" => "disable",
> > "bin-environment" => ("REAL_SCRIPT_NAME" => "")
> > ))
> > )
> > # Disable fcgi for resources with an extension (except /sitemap.xml).
> > $HTTP["url"] =~ "^.+\..{3,4}$" {
> > $HTTP["url"] != "/sitemap.xml" {
> > expire.url = ("" => "access 1 days")
> > fastcgi.server = ()
> > }
> > }
> > # END NOPHILOSOPHY
> >
> > That part takes care of the nophilosophy.com domain, www. and non-www.
> > Hope it helps!
> >
> > Greetings,
> >
> > Hraban
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---