Re: Best practices to provide Django on a shared host

2007-07-05 Thread Graham Dumpleton

On Jul 5, 5:38 pm, "Fabien Schwob" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm currently hosting  my Django websites on a dedicated server and it
> works fine. I restart Apache when I make modifications since I'm alone
> on the box.
>
> But I've made evangelism for Django and I've convinced some friends to
> use it. So I would like to take a new server and to set up a "Django
> Shared Hosting". What is the best way to do that ?
>
> - One Apache instance by user/website (I've seen that 
> onhttp://www.gypsyhosting.com/) ? But how to do that does someone have
> some links to do that ?
>
> - Using lighttpd and FGCI ?
>
> - Using Apache and FCGI, so the user only need to *touch* the fcgi script.
>
> My goal is to build my shared hosting and to create a document on how
> to do that. So, any help are welcome.

You may want to have a look at mod_wsgi (www.modwsgi.org) and the
following instructions for Django:

  http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango

It contains a few different recipes. For what you want, one Django
site per VirtualHost run using mod_wsgi daemon mode would be the best.

To trigger a restart of the process and thus reload any changes, they
can send a SIGINT signal to the httpd process which is owned by them.
One could even have a web page in the application itself which
triggered:

  os.kill(os.getpid(), signal.SIGINT)

This will cause the process to be shutdown and restarted at the end of
the request.

The other alternative is to turn on interpreter reloading, which will
result in the Python sub interpreter being destroyed within the
running process when the WSGI application script file is modified, and
a new sub interpreter created with any changed code. How reliable this
works depends a bit on what third party C extension modules are being
used. Interpreter reloading is controlled by the WSGIReloadMechanism
directive and is documented in:

  http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives

A discussion of issues related to interpreter reloading can be found
in section 'Reloading Python Interpreters' in:

  http://code.google.com/p/modwsgi/wiki/ApplicationIssues

If interested in this and have further questions let me know.

Graham


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Best practices to provide Django on a shared host

2007-07-05 Thread Fabien Schwob

> Textdrive (Joyent) offers Django hosting.
>
> There is an install script that will setup Django for you:
> http://textusers.com/wiki/Installing_Django

The problem is that I would like to make my own configuration from a
raw Linux distribution (In my case a Ubuntu 6.10 or 7.04). So, with
this link I don't know how are Textdrive server configured.

My goal is for example to provide a tutorial on how to build something
like Gypsyhosting from a clean Ubuntu install.

Thanks

-- 
Fabien SCHWOB

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Best practices to provide Django on a shared host

2007-07-05 Thread Evan H. Carmi

Fabien Schwob wrote:
> Hello,
> 
> I'm currently hosting  my Django websites on a dedicated server and it
> works fine. I restart Apache when I make modifications since I'm alone
> on the box.
> 
> But I've made evangelism for Django and I've convinced some friends to
> use it. So I would like to take a new server and to set up a "Django
> Shared Hosting". What is the best way to do that ?
> 
> - One Apache instance by user/website (I've seen that on
> http://www.gypsyhosting.com/) ? But how to do that does someone have
> some links to do that ?
> 
> - Using lighttpd and FGCI ?
> 
> - Using Apache and FCGI, so the user only need to *touch* the fcgi script.
> 
> My goal is to build my shared hosting and to create a document on how
> to do that. So, any help are welcome.
> 
> Thanks.
> 
Textdrive (Joyent) offers Django hosting.

There is an install script that will setup Django for you:
http://textusers.com/wiki/Installing_Django

Evan


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Best practices to provide Django on a shared host

2007-07-05 Thread Fabien Schwob

Hello,

I'm currently hosting  my Django websites on a dedicated server and it
works fine. I restart Apache when I make modifications since I'm alone
on the box.

But I've made evangelism for Django and I've convinced some friends to
use it. So I would like to take a new server and to set up a "Django
Shared Hosting". What is the best way to do that ?

- One Apache instance by user/website (I've seen that on
http://www.gypsyhosting.com/) ? But how to do that does someone have
some links to do that ?

- Using lighttpd and FGCI ?

- Using Apache and FCGI, so the user only need to *touch* the fcgi script.

My goal is to build my shared hosting and to create a document on how
to do that. So, any help are welcome.

Thanks.

-- 
Fabien Schwob

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---