I configure many project in bluehost the ways i use is put the code in dir
home for example
/home/user/projects/mysite
in /home/user/public_html/django.fcgi and .htaccesss and the content is:
django.wsgi

#!/home3/user/bin/python

import sys, os
sys.path.insert(0,"/home3/user/projects/mysite")

from flup.server.fcgi import WSGIServer

os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
from django.core.handlers.wsgi import WSGIHandler
WSGIServer(WSGIHandler()).run()

and .htaccess
Options +SymLinksIfOwnerMatch
RewriteEngine On
RewriteBase /
RewriteRule ^(media/.*)$ - [L]
RewriteCond %{REQUEST_URI} !(django.fcgi)
RewriteRule ^(.*)$ django.fcgi/$1 [L]


that is all.

cheer



On Sun, Sep 23, 2012 at 10:21 PM, Zach <zach.herma...@gmail.com> wrote:

> Hey everyone,
> I have recently been setting up a Django 1.4.1 project with python 2.7.2
> and MySQL. I am using fcgi to deploy my project in this environment because
> mod_wsgi is not available through bluehost. After much frustration I have
> gotten my site up to display the "it works" page. Now for some strange
> reason I can not get it away from this page. I have set up the urls.py file
> for the main project along with adding my app into the Installed_Apps
> section of the settings.py file.
> My .htaccess file is the following
> *AddHandler fcgid-script .fcgi*
> *Options +SymLinksIfOwnerMatch*
> *RewriteEngine On*
> *RewriteBase /*
> *RewriteRule ^(media/.*)$ - [L]*
> *RewriteRule ^(adminmedia/.*)$ - [L]*
> *RewriteCond %{REQUEST_URI} !(mysite.fcgi)*
> *RewriteRule ^(.*)$ mysite.fcgi/$1 [L]*
>
> My mysite.fcgi is the following
> *#!/home1/propesn4/python27/bin/python*
> *import sys, os*
> *sys.path.insert(0, "/home1/propesn4/python27")*
> *os.environ['DJANGO_SETTINGS_MODULE'] = "project.settings"
> *
> *sys.path.append("/home1/propesn4/project/")*
> *from django.core.servers.fastcgi import runfastcgi*
> *runfastcgi(method="threaded", daemonize="false")*
> *
> *
> When I make changes to my django project I preform a *touch mysite.fcgi* so
> that the fcgi agent knows there has been changes.
> If anyone could lead me in the right direction I would really appreciate
> it!
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/Aqyku-yyimsJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to