Re: Django on Bluehost

380 views
Skip to first unread message

carlos

unread,
Sep 24, 2012, 4:47:25 PM9/24/12
to django...@googlegroups.com
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.h...@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...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Alec Taylor

unread,
Sep 24, 2012, 6:26:37 PM9/24/12
to django...@googlegroups.com
You will probably crap-out with Bitbucket. Go to a cloud provider instead.

For example, Red Hat OpenShift offers their IaaS platform for free (ATM anyway).

Babatunde Akinyanmi

unread,
Sep 24, 2012, 10:59:55 PM9/24/12
to django...@googlegroups.com
If cloud, I like dotcloud

On 9/24/12, Alec Taylor <alec.t...@gmail.com> wrote:
> You will probably crap-out with Bitbucket. Go to a cloud provider instead.
>
> For example, Red Hat OpenShift offers their IaaS platform for free (ATM
> anyway).
>
> On Mon, Sep 24, 2012 at 2:21 PM, Zach <zach.h...@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...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users...@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...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

--
Sent from my mobile device

Gladson Simplício Brito

unread,
Sep 25, 2012, 2:20:16 PM9/25/12
to django...@googlegroups.com
https://www.appfog.com/ 

2012/9/24 Babatunde Akinyanmi <tunde...@gmail.com>

JJ Zolper

unread,
Sep 29, 2012, 1:08:51 AM9/29/12
to django...@googlegroups.com
I hate to be that guy but...

I was on Bluehost for a while but I just ended up deciding the benefits of switching to WebFaction far outweighed the benefits of staying on Bluehost as a Django user.

If you're interested in joining WebFaction or hearing more about it feel free to send me an e-mail at JZt...@gmail.com and I can tell you more about it.

If you feel that it suits what you want to do better I would be happy if you listed me as an affiliate! (Which I can explain if the time comes)

See ya later.

JJ


On 09/24/2012 12:21 AM, Zach 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.
Reply all
Reply to author
Forward
0 new messages