It seems it would be simpler to run a cgi script to run it according to the django book I was reading. Is it possible to accomplish this? <br><br><blockquote><h4 class="cn" id="cn152">Running Django on a Shared-Hosting Provider with Apache<span></span></h4>
<p class="cn" id="cn153">Many shared-hosting providers don’t allow you to run your own server daemons
or edit the <tt class="docutils literal"><span class="pre">httpd.conf</span></tt> file. In these cases, it’s still possible to run
Django using Web server-spawned processes.</p><div style="height: 38px;" id="b153" class="comment-indicator"><span></span></div><div class="admonition-note admonition cn admonition" id="cn154">
<p class="first admonition-title">Note</p>
<p class="last">If you’re using Web server-spawned processes, as explained in this
section, there’s no need for you to start the FastCGI server on your own.
Apache will spawn a number of processes, scaling as it needs to.<span></span></p></div><p class="cn" id="cn155">In your Web root directory, add this to a file named <tt class="docutils literal"><span class="pre">.htaccess</span></tt></p>
<div style="height: 20px;" id="b155" class="comment-indicator"><span></span></div><pre class="cn literal-block" id="cn156">AddHandler fastcgi-script .fcgi<br>RewriteEngine On<br>RewriteCond %{REQUEST_FILENAME} !-f<br>RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]<span></span></pre>
<p class="cn" id="cn157">Then, create a small script that tells Apache how to spawn your FastCGI
program. Create a file, <tt class="docutils literal"><span class="pre">mysite.fcgi</span></tt>, and place it in your Web directory, and
be sure to make it executable</p><span></span><pre class="cn literal-block" id="cn158">#!/usr/bin/python<br>import sys, os<br><br># Add a custom Python path.<br>sys.path.insert(0, "/home/user/python")<br><br># Switch to the directory of your project. (Optional.)<br>
# os.chdir("/home/user/myproject")<br><br># Set the DJANGO_SETTINGS_MODULE environment variable.<br>os.environ['DJANGO_SETTINGS_MODULE'] = "myproject.settings"<br><br>from django.core.servers.fastcgi import runfastcgi<br>
runfastcgi(method="threaded", daemonize="false")<br></pre></blockquote>
<br clear="all">-----------------------------------------------------------------<br><a href="http://eyecreate.googlepages.com/quotes">http://eyecreate.googlepages.com/quotes</a><br><br><br>
<br><br><div class="gmail_quote">On Thu, May 7, 2009 at 1:43 PM, Benjamin Hell <span dir="ltr"><<a href="mailto:beni@hcoop.net">beni@hcoop.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hcoop wrote:<br>
^^^^^<br>
You are using a very generic (and somewhat mis-leading) name for<br>
your hcoop address setup in Gmail...<br>
<div class="im"><br>
> thanks, for your replys. If mod_python is the best option for hcoop, how<br>
> would I go setting it up to run in the background?<br>
<br>
</div>There is detailed information on how I did it on the wiki:<br>
<br>
<a href="http://wiki.hcoop.net/RunningYourOwnApache" target="_blank">http://wiki.hcoop.net/RunningYourOwnApache</a><br>
<br>
For the Django part I haven't written anything (yet), but if I<br>
recall right it was pretty a straightforward task with the Django<br>
documentation, after mod_python was running properly (for testing<br>
that see the simple example in the mod_python documentation).<br>
<div><div></div><div class="h5"><br>
<br>
Cheers,<br>
<br>
Beni<br>
<br>
_______________________________________________<br>
HCoop-Help mailing list<br>
<a href="mailto:HCoop-Help@lists.hcoop.net">HCoop-Help@lists.hcoop.net</a><br>
<a href="https://lists.hcoop.net/listinfo/hcoop-help" target="_blank">https://lists.hcoop.net/listinfo/hcoop-help</a><br>
</div></div></blockquote></div><br>