-get a free 10MB account
-place Django Project in the www directory
-add .htaccess to www director(see below)
-add django.fcgi file (see below)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AddHandler fcgid-script .fcgi | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ django.fcgi/$1 [QSA,L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os, sys | |
#change ALWAYSDATASUBDIRECTORYNAME | |
#change labcon3 to the name of the django project folder | |
_PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) | |
sys.path.insert(0, "/home/ALWAYSDATASUBDIRECTORYNAME/python") | |
sys.path.insert(0, _PROJECT_DIR) | |
sys.path.insert(0, os.path.dirname(_PROJECT_DIR)) | |
sys.path.insert(0, _PROJECT_DIR) | |
sys.path.insert(0, os.path.join(_PROJECT_DIR, 'labcon3')) | |
_PROJECT_NAME = _PROJECT_DIR.split('/')[-1] | |
os.environ['DJANGO_SETTINGS_MODULE'] = "labcon3.settings" | |
from django.core.servers.fastcgi import runfastcgi | |
runfastcgi(method="threaded", daemonize="false") | |