bdelliott
bdelliott

Reputation: 493

Restarting FCGI on 1and1 shared host

I am trying to install Django on a 1and1 shared server but it is failing when I try to run the web server (manage.py runserver) because of my settings in my appname.fcgi found off the webroot and in my cgi-bin folder:

ImportError: Could not import settings 'appname.settings' (Is it on sys.path?): No module named settings

I have changed the value in my appname.fcgi file to be:

os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'

But the error message remains the same and the following article says to restart fcgi by using: touch yourdjangoapp.fcgi

Installing a Django app on 1and1 Linux shared hosting

But this doesn't seem to restart fcgi. Is there another way of restarting fcgi on a 1and1.com shared hosting server?

Upvotes: 1

Views: 648

Answers (1)

bdelliott
bdelliott

Reputation: 493

Thanks for the great suggestion! I started to go down this path and then realized that my 1and1 account is set up with my django web site as a virtual site off the main root. So that I have a subdirectory off the main root that acts as the web root for my django web site. So: root/dango web root. So my django web root is where my .htaccess and project.fcgi file needed to be not at a level up. Once I did this it all started working!

Upvotes: 0

Related Questions