[TurboGears] TG as standalone web server AS jorma

25 views
Skip to first unread message

jormak

unread,
Oct 15, 2012, 9:59:46 AM10/15/12
to turbo...@googlegroups.com

Hi,
I am aware this is a naive question but I'd be very grateful for some
insight as I don't understand: Most TG deplyment scenarios mention using TG
with Apache. Why is this necessary? Why can't TG be used as a standalone web
server serving web pages and responding to web requests at a given port?
Thank you very much
Jorma
--
View this message in context: http://old.nabble.com/TG-as-standalone-web-server-AS-jorma-tp34558340p34558340.html
Sent from the Turbogears General mailing list archive at Nabble.com.

Carlos Daniel Ruvalcaba Valenzuela

unread,
Oct 15, 2012, 11:00:52 AM10/15/12
to turbo...@googlegroups.com
>On Mon, Oct 15, 2012 at 6:59 AM, jormak <jjk...@gmail.com> wrote:
> I am aware this is a naive question but I'd be very grateful for some
> insight as I don't understand: Most TG deplyment scenarios mention using TG
> with Apache. Why is this necessary? Why can't TG be used as a standalone web
> server serving web pages and responding to web requests at a given port?

For many reasons, first being that the build in server (Paste) is not
made to work in production environments directly, performance would be
abysmal compared to using apache or a production wsgi server; security
is also a concern as Paste is not meant to be used in production
environments directly.

Now, you could run for example gunicorn or uwsgi directly, both can
serve http directly to any port, but then again serving static files
using a python wsgi server is not very performant compared to apache
or nginx, this is why it is preferred to use apache or nginx (as
reverse proxy).

SSL is another concern, you cannot serve SSL directly with build in
Paste server, but under Apache or nginx you can have an SSL
certificate and serve HTTPS connections.

Regards,
Carlos Daniel Ruvalcaba Valenzuela

Michael Pedersen

unread,
Oct 15, 2012, 10:03:41 PM10/15/12
to turbo...@googlegroups.com
Carlos really did hit it pretty much spot on. Just to throw in my own
two cents worth: TurboGears is not a web server. We use Paste to
provide a development only webserver, but that is very unsuited for
production use. TurboGears is a web application framework that assists
you in making your own web application.

You can't run TG as a webserver because the functionality isn't there.
As for why not to use Paste? See Carlos' reply. He covers that very
well.

--
Michael J. Pedersen
My Online Resume: http://www.icelus.org/ -- Google+ http://plus.ly/pedersen
Google Talk: m.ped...@icelus.org -- Twitter: pedersentg

jormak

unread,
Oct 16, 2012, 5:19:49 AM10/16/12
to turbo...@googlegroups.com

ok thanks very much for very informative replies.
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To post to this group, send email to turbo...@googlegroups.com.
> To unsubscribe from this group, send email to
> turbogears+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/turbogears?hl=en.
>
>
>

--
View this message in context: http://old.nabble.com/TG-as-standalone-web-server-tp34558340p34562425.html

Sam

unread,
Oct 17, 2012, 3:44:36 PM10/17/12
to TurboGears
As others have explained, TG 2.x isn't really designed for this.

If you really want to do it anyway, you might consider TG 1.5. It's
also not designed for this, but it uses CherryPy, which is a very
capable and fast web server.

Even in that case, you're almost certainly better off also using
Apache or something else. But CherryPy is fast, and pretty full
featured.

-Sam

On Oct 15, 6:59 am, jormak <jjk...@gmail.com> wrote:
> Hi,
> I am aware this is a naive question but I'd be very grateful for some
> insight as I don't understand: Most TG deplyment scenarios mention using TG
> with Apache. Why is this necessary? Why can't TG be used as a standalone web
> server serving web pages and responding to  web requests at a given port?
> Thank you very much
> Jorma
> --
> View this message in context:http://old.nabble.com/TG-as-standalone-web-server-AS-jorma-tp34558340...

Michael Pedersen

unread,
Oct 17, 2012, 3:47:12 PM10/17/12
to turbo...@googlegroups.com
On Wed, Oct 17, 2012 at 3:44 PM, Sam <sams...@gmail.com> wrote:
> If you really want to do it anyway, you might consider TG 1.5. It's
> also not designed for this, but it uses CherryPy, which is a very
> capable and fast web server.

Have to disagree with this. TG2 is where the main work is happening.
TG2 is the path forward for TurboGears. Using TG1.5 without having a
much more solid reason than "it comes with a better web server" is not
something we recommend, at all.
Reply all
Reply to author
Forward
0 new messages