Hi I want to do user subdomains such as
how do we achieve this in webpy + lighty
thanks
Krypton
> Hi I want to do user subdomains such as
>
> webpy.infogami.com
>
> or krypton.slide.com
>
> how do we achieve this in webpy + lighty
This is the lighttpd configuration you need.
$HTTP["host"] =~ "^.*slide.com$" {
server.document-root = "/path/to/code/"
fastcgi.server = ( "/run.py" =>
(( "socket" => "/tmp/slide.socket",
"bin-path" => "/path/to/code/run.py",
"max-procs" => 1
))
)
url.rewrite-once =(
"^/favicon.ico$" => "/static/favicon.ico",
"^/static/(.*)$" => "/static/$1",
"^/(.*)$" => "/run.py/$1",
)
}
and in web.py code, you can get the hostname by looking at web.ctx.host.
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
now all the hits to
web.slide.com will all goto '/'
and / is mapped to index in urls
how do i map anand.slide.com to profile/anand
and web.slide.com to profile/web