Only one application at a time can listen to a TCP port.
You can certainly run a web server as a front end (like Apache, or one
of the lightweight web servers like Xitami or lighttpd), and have them
allocate your subdomain requests out to different ports.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.
If your various apps can somehow be assembled into one root object,
you could also look into using the VirtualHost dispatcher. See
http://tools.cherrypy.org/wiki/VirtualHosts.
Jacob
> --
> You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
> To post to this group, send email to cherryp...@googlegroups.com.
> To unsubscribe from this group, send email to cherrypy-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en.
>
The above is generally what I do. I have the varios CP instances
listening on localhost:n, localhost:n+1 etc and then just filter the
requests by Host using Nginx. This doubles as a nice way to keep the CP
instances from needing superuser permissions and leaves any logic about
the actual URL where the apps can be found out of the app code, which is
(IMHO) as it should be.
--
Anders Langworthy
PGP Key -> AC8C B93A C0AF 1439 A21D 9293 B774 A51E AA1F 608A
Unless you're just curious, I'm pretty sure you don't even want to
consider that approach. Using a real reverse proxy, you can keep your
applications completely separate. On Windows, IIS+Application Request
Routing is probably the path of least resistance.
Jacob
Unless I'm mistaken, your real goal is to produce webapps, not web
proxies. Maybe some of the web apps are written using Python and
CherryPy, maybe some aren't (e.g. ASP.NET, Spring, etc.) Using the
right tool for the job, or at least a good tool for the job, will help
meet this goal. There are a number of good reverse proxy options
available to forward requests on port 80 to other ports of your
choosing. So unless you're really interested in reinventing that
particular wheel, then my advice would be to select one of these,
become friends with it, and let it do that work for you. Then you can
focus on developing the webapps.
FWIW, I do all my reverse proxying using nginx. It's simple to setup
and configure. But I'm running on Linux, not Windows.
But if anyone did decide to try this, they shouldn't use CherryPy's application layer, because WSGI contains some one-way transformations and limitations that prohibit creation of a generic HTTP proxy. You might be able to use CherryPy's HTTP server without WSGI, but if you wanted to pursue that, you should start with Cheroot [1], which is CherryPy's HTTP server broken out into its own project.
Robert Brewer
fuma...@aminus.org
[1] https://bitbucket.org/cherrypy/cheroot
> --
> You received this message because you are subscribed to the Google
> Groups "cherrypy-users" group.
> To post to this group, send email to cherryp...@googlegroups.com.
> To unsubscribe from this group, send email to cherrypy-
> users+un...@googlegroups.com.
> To post to this group, send email to cherrypy-users@googlegroups.com.
> To unsubscribe from this group, send email to cherrypy-
To view this discussion on the web visit https://groups.google.com/d/msg/cherrypy-users/-/6-Upb0t-Qj0J.
To post to this group, send email to cherryp...@googlegroups.com.
To unsubscribe from this group, send email to cherrypy-user...@googlegroups.com.
Ok ok i am now convinced this should not be done in CP.Problem is i cant get IIS running properly, lighttpd is acting up, portfusion crashes, i hate apache, my dlink router cant do it, im running out of options!I guess nginx is next, but that will probably cost me another day of headache. :)G