There are few thing here:

1. I am root on that box. So can change apache conf. But have a little
knowledge how to do it. So decided to use that way, as thought it's
easier for hosting many django apps. So please tell me what to check.
2. I believe that htaccess is working as web server redirected me to mysite.fcgi
3. I am using fedora, so installed fcgid from yum, but not fcgi. Can
it cause the problem? Should I install fcgi instead?

Thanks in advance,
Oleg

On Mon, Apr 6, 2009 at 1:41 AM, Daniel Roseman
<[email protected]> wrote:
>
> On Apr 5, 10:04 pm, Oleg Oltar <[email protected]> wrote:
>> Hi!
>>
>> I am trying to serve my project using server-spawned processes
>>
>> I created file .htaccess in my web_root directory which contains:
>> AddHandler fastcgi-script .fcgi
>> RewriteEngine On
>> RewriteCond %{REQUEST_FILETherNAME} !-f
>> RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]
>>
>> And also added file mysite.fcgi to same dir
>> #!/usr/bin/python
>> import sys, os
>>
>> # Add a custom Python path.
>> sys.path.insert(0, "/home/user/python")
>>
>> # Switch to the directory of your project. (Optional.)
>> # os.chdir("/home/user/myproject")
>>
>> # Set the DJANGO_SETTINGS_MODULE environment variable.
>> os.environ['DJANGO_SETTINGS_MODULE'] = "myproject.settings"
>>
>> from django.core.servers.fastcgi import runfastcgi
>> runfastcgi(method="threaded", daemonize="false")
>>
>> But when trying to go to my domainhttp://goclub.org.ua/I see the
>> contents of mysite.fcgi instead of my site...
>>
>> Could you please help me to understand the problem
>
> Directives are only allowed in .htaccess files if the main Apache
> configuration has been set to allow them. It's possible that whoever
> runs your server has not allowed the use of AddHandler in .htaccess,
> so it is serving the file rather than running it.
>
> Talk to your hosting company and see if this is the case, and if so
> whether there are any alternatives that they support.
> --
> DR.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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