Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In the past, I've written websites in two languages. PHP for smaller sites and Python for larger sites. With this setup, I would run multiple Paster instances to serve each site on a different port and then use nginx to proxy to Paster. This worked fine.

However, I no longer wish to use PHP for smaller sites. I want to use Python. This means the server could be running more than ~50 websites, for example. At this point, it seems silly to be running 50 instances of Paster on 50 different ports.

What's the best alternative here?

Cheers.

share|improve this question
add comment

2 Answers

You should give uWSGI a try. We use on our servers with nginx with virtualenv, and IMHO is one the best way to deploy WSGI apps. It is a bit scary (lot of options) to configure at first, but it's a very powerful application server.

share|improve this answer
add comment

Unfortunately, while paster is great for hosting low-level or small sites, the fact that Python's ability to use multithreading (due to the GIL) means that you're essentially limiting how quickly paster can respond.

Paster is just a WSGI server, and what you're looking for is another server that circumvents this restriction. Graham Dumpleton's mod_wsgi is a great (and as far as I know, only) WSGI server that runs through Apache, which means you can use your normal methods for hosting web sites. Configuration is very simple, and the site includes an example for configuring Pylons, of which Pyramid is its spiritual successor.

If worse comes to worst, the mailing list is a treasure trove of information, and you can expect answers to your questions extremely quickly.

Hope this gets you on the right track!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.