WebFaction
Community site: login faq

Hi guys,

I've just gone through the instructions for setting up Django 1.4 provided on Webfaction's website. I've come to look at my beautiful 'Welcome to Django' page and got :

Not Found The requested URL / was not found on this server.

Checked for Admin too (activated in URL's and apps) and got the same message.

I've double checked the entire procedure and all my settings and I'm pretty sure I've done it word for word. No suggestion of this on Django Troubleshooting in the docs so just wondering where to go from here? Any advice welcome.

asked 09 Apr '12, 05:07

zilog8bit
271818
accept rate: 0%


Hi,

This usually indicates a wrong path to the WSGI script in your httpd.conf file - please check that. You can also check ~/logs/user/error_<appname>.log for a more informative error message.

If you cannot fix this, please open a support ticket, so we can take a look at your configuration.

permanent link

answered 09 Apr '12, 05:13

todork
1.2k4
accept rate: 34%

Aha!,

thanks for that todork, it was indeed in httpd.conf. My app name is in the path twice and I had only written it once......

but now.... I have an Internal Server Error. The logs say it couldn't import my settings.py as there was no module by this name. Syncdb works without a problem and posts a couple of years back keep going on about the Python path in httpd.conf but I'm no longer sure if the configurations from back then are relevant.

My path in conf is:

home/<username>/webapps/<appname>/lib/python2.7

Should there be something else in here? .... Wow, no wonder PHP has done so well in web dev, shame it's as ugly as sin compared to Python.

(09 Apr '12, 05:46) zilog8bit

You are most welcome!

Make sure that you have the directory containing settings.py (or its parent directory depending on how it is being imported in your WSGI file) on your Python search path. To see how to add to the Python search path, you can take a look at the following article in our docs.

(09 Apr '12, 06:16) todork

Right, tried to follow the docs which I think I understand, but it mentions a .wsgi file, as do many other threads on Stackoverflow. I have no .wsgi file as it wasn't created when I installed Django (through the Webfaction control panel). I do have a wsgi.py file but there is only one line mentioning settings:

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "homeapp.settings").

(09 Apr '12, 06:29) zilog8bit

The wsgi.py file is your .wsgi file (different convention there). Since it's trying to load homeapp.settings, make sure that the directory that contains the "homeapp" directory is on the Python search path - this should fix it.

If you still can't figure it out, I'd suggest that you open a ticket.

(09 Apr '12, 07:23) todork
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×905
×102
×33
×5
×2

question asked: 09 Apr '12, 05:07

question was seen: 18,344 times

last updated: 09 Apr '12, 07:23

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM