0

I'm looking for a simple way to serve my pylons application in both HTTP & HTTPS (for the administration section). I had come across some tutorials on serving pylons applications through an Apache web-server but I don't need that kind of overhead for something so simple. This got me thinking, is it possible to do it with one of the lighter web-servers out there lighttpd?

I don't know much about either outside of pylons so any help would be appreciated. I already have a server certificate (self-signed) that I use for my pylons <-> postgresql connection.

Thanks.

Edit: Seemingly I cannot create a new tag "pylons" so I will add it when I am able.

2 Answers 2

0

I had never heard of Pylons, so I Googled it with Apache and came across the Pylons wiki page for Pylons+SSL+Apache... One of these howtos might be what you're looking for.

1
  • Thanks, the second link about serving a pylons web-application through lighttpd will be useful. Now it should be as simple as figuring out how to direct non-SSL requests to an arbitrary administration URL like "/admin/*" to it's SSL equivalent. I've seen in a discussion somewhere about using lighttpd to modify the request headers before it reaches my pylons web-application to set a flag saying this request was using SSL, but I am clueless as to how to accomplish that. Thanks though.
    – user6623
    Jun 1, 2009 at 6:43
0

If you don't need to distinguish between a HTTP and HTTPS connection in Pylons, you can quite easily do this with stunnel. The sample stunnel.conf file that is distributed with all versions of stunel already contains commented configuration to do this.

1
  • I've checked out Stunnel and while it is very useful I really need a way to require that people connecting to /admin/* be using a secure socket layer. Thanks.
    – user6623
    Jun 1, 2009 at 6:29

You must log in to answer this question.