python - Porting Django Project to 1&1 Shared Hosting Web-server -


as little background, i've been developing django application 1&1 shared hosting website. when tried port app web, followed tutorial here: http://robhogg.me.uk/post/2. servers have python 2.6, , installed django , flup through ssh. here .fsgi file...

#!/usr/bin/python import sys, os  basepath = '/home/path/' # isn't actual homepath  sys.path.insert(0, basepath + '/.local/lib') sys.path.insert(0, basepath + '/mysite')  os.environ['django_settings_module'] = 'mysite.settings'  django.core.servers.fastcgi import runfastcgi runfastcgi(method='threaded', daemonize='false') 

...and here .htaccess file...

addhandler fcgid-script .fcgi rewriteengine on rewritecond %{request_filename} !(cgi-bin/mysite.fcgi)  rewriterule ^(.*)$ cgi-bin/mysite.fcgi/$1 [qsa,l] 

i gave .fcgi script 755 permissions. when run .fcgi script, homepage html prints on console (which according many sites means script good). when go website's domain, getting index.html page sitting in home directory. moved html files home directory, , tried again. time error:

forbidden  don't have permission access / on server.  additionally, 404 not found error encountered while trying use errordocument handle request. 

i tried 1 more thing, , in .htaccess file, changing

addhandler fcgid-script .fcgi 

to

addhandler fastcgi-script .fcgi 

after searching everywhere, couldn't find solution, followed directions on site: https://help.asmallorange.com/index.php?/knowledgebase/article/view/140 though different host, same concept similar steps. followed steps, creating new project , everything, , in end, had same issue.

i've been through ton of posts one, none have had solution worked yet. maybe 1&1 specific issue, appreciate if has suggestions.

i got same error got. after moved .htaccess file django project folder, works.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -