Virtual Host Support?

11 views
Skip to first unread message

jlist9

unread,
Dec 24, 2009, 5:02:30 PM12/24/09
to we...@googlegroups.com
Does web.py have any built-in virtual host support to handle multiple domains?

I'm think to run a low traffic production site with multiple domains on web.py's
built-in web server. I think even with Apache as the front-end server, mod_scgi
does not support virtual host settings. Requests for all sites will be
redirected
to the same back-end web.py process. So I suppose even when using Apache
as the front-end server, some virtual host related work needs to happen in the
web.py app. Or am I missing anything obvious?

Thanks!
Jack

ambre

unread,
Dec 25, 2009, 7:38:39 AM12/25/09
to web.py
When you use apache, you can setup several virtual hosts, and within
each virtual host configuration
you can use mod_redirect in order redirect to the webapp.

Erwin

jlist9

unread,
Dec 25, 2009, 1:39:24 PM12/25/09
to we...@googlegroups.com
The scgi rule in httpd.conf directs apache to forwards to
scgi server based on URL:

SCGIMount /dynamic 127.0.0.1:4000

So, if I'm running multiple domains, I would run multiple instances
of web.py on different ports, something like this?

SCGIMount /domain1.com/dynamic 127.0.0.1:4001
SCGIMount /domain2.com/dynamic 127.0.0.1:4002

This is certainly an option. I didn't check what URL web.py would
get in this case. Not sure if it contains the domain name.

In some cases, I'd like to run one instance of web.py to support
multiple sites, whether behind Apache or not. There doesn't seem
to be any virtual hosts awareness in web.py, specifically regarding
where to load domain specific templates, static files, and URL
handlers.

That said, I can certainly go the multi-instance way. It's just when
the sites are running the same version of web.py app, it's a little
more effort to manage/update the files.

Thanks,
Jack

> --
>
> You received this message because you are subscribed to the Google Groups "web.py" group.
> To post to this group, send email to we...@googlegroups.com.
> To unsubscribe from this group, send email to webpy+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/webpy?hl=en.
>
>
>

Reply all
Reply to author
Forward
0 new messages