Re: django + python3 + fastcgi + shared hosting not working

96 views
Skip to first unread message

Héctor Urbina

unread,
Feb 26, 2014, 8:57:57 AM2/26/14
to django...@googlegroups.com
I'm worry,

where I wrote --previs, it should say --prefix.


2014-02-26 10:55 GMT-03:00 Héctor Urbina <hurb...@gmail.com>:
Hello,

I'm trying to deploy a django project on justhost.com. I have a locally installed version of python3 and I'm using the development version of django. I know I have to use fastcgi.

My ~/public_html/uddo/.htaccess is:

AddHandler fastcgi-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ uddo.fcgi/$1 [QSA,L]

and my uddo.fcgi is:

#!~/bin/python3
import sys, os

# Add a custom Python path.
## I installed python3 with --previs=~/, so bin and lib folders are in my home directory...
sys.path.insert(0, "~/")
sys.path.insert(13, "~/src/uddo")

# Switch to the directory of your project. (Optional.)
os.chdir("~/src/uddo/")

# Set the DJANGO_SETTINGS_MODULE environment variable.
os.environ['DJANGO_SETTINGS_MODULE'] = "uddo.settings"

from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")

However, when reaching the site url, I get a 404 Error - File Not Found.
I find only this on apache's error_log:

[Wed Feb 26 06:49:29 2014] [error] [client xxx.xx.xx.xxx] File does not exist: ~/public_html/uddo/uddo.fcgi/

Where "~" is actually the path to my home.

Does anyone know what could be wrong?

--
Héctor Urbina S.
Ingeniero en Bioinformática
Fono: 82049138



--
Héctor Urbina S.
Ingeniero en Bioinformática
Fono: 82049138

Héctor Urbina

unread,
Feb 26, 2014, 8:55:11 AM2/26/14
to django...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages