On May 19, 4:48 am, Daniel Ellison <[EMAIL PROTECTED]> wrote:
> On Friday 18 May 2007 14:06:48 [EMAIL PROTECTED] wrote:
>
> > I've tried googling for this for days without success. I'm looking for
> > a way to deploy a django app on amod_pythonenabled server to which I
> > do not have httpd.conf access.
>
> This is entirely possible. Take whatever you were going to put in a <Location>
> directive in httpd.conf, and put it in a .htaccess file in your Django
> project's root without the enclosing <Location></Location>. For example, this
> is (almost) what I have in a .htaccess file on a working development server I
> use:
>
> PythonPath "['/home/[your_home]'] + sys.path"
> SetHandler python-program
> PythonHandler django.core.handlers.modpython
> SetEnv DJANGO_SETTINGS_MODULE mysite.settings
> PythonDebug On
>
> If you want to have Apache handle any subdirectories, just put "SetHandler
> None" into a .htaccess file in that directory. This replaces, for example,
>
>  <Location "/files/">
>      SetHandler None
>  </Location>
>
> in the httpd.conf file. Keep in mind that all of these directives affect all
> subdirectories.
>
> > Also. Rightly or wrongly, I am also trying to achieve this with the
> > app and django files parallel to, not in, public_html.
>
> This approach works only if Apache can read the .htaccess files. This probably
> means that it has to be under whatever Apache believes to be its public_html
> directory, and since you don't have access to the httpd.conf file you have no
> say in the matter, unfortunately.

This will all only work if the web site administrator has also set:

  AllowOverride FileInfo

for the directory containing the .htaccess file you want to add the
the SetHandler directive to.

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to