Manu
Manu

Reputation: 4137

Django application on server with no root access

I am about to deploy my Django application on the production server. Currently, I am facing a bad thing: the production server is a shared web hosting platform (on OVH). So, the first problem I have is that I cannot install django myself. Also, I am not sure about mod_wsgi being installed (or installable) on Apache.

My question is: is there a workaround to installing django? If so, where do I find some documentation to do it?

Thanks.

Upvotes: 0

Views: 771

Answers (1)

Daniel Roseman
Daniel Roseman

Reputation: 599788

You shouldn't be installing as root anyway. Use a virtualenv in your allocated directory, and install everything in there. You should be using a virtualenv in development as well, so that you can create a requirements file as part of your codebase which can then be used to rebuild everything in production.

If the host doesn't include mod_wsgi, there are plenty of alternatives these days. Mostly I'm using gunicorn for my projects; it's easy to set up and you can run it yourself, with Apache or nginx simply working as a reverse proxy to send requests there.

However, that does depend on the ability to run long-running processes on your host; if they don't allow that (some don't), it's a problem. An alternative might be FCGI though, although at this point I'd probably be looking for an alternative host.

Upvotes: 1

Related Questions