I have a django application that actually works perfectly underneath the django development server. Now I am attempting to run it under apache2.2 while using mod_wsgi.
Within the httpd.conf file of apache I have added:

<IfModule wsgi_module>
    WSGIScriptAlias /index my_path_to_wsgi_modules/django.wsgi
</IfModule>

and also the django.wsgi module consists of all of the fundamental configuration as described in django documentation: http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/
Regrettably after i run the server and then try to access the primary page I have the template page but without variable data inside it. The server log states:

[Fri Feb 18 13:50:33 2011] [error] [client 127.0.0.1] File does not exist: /usr/local/apache2/htdocs/api, referer: http://127.0.0.1/example/


When I stated prior to the strange factor would be that the same code works perfectly under django development server. I am new in programming web application, please, can anybody help?

My django.wsgi file appears like this:

import os import sys

from os.path import sep

basepath = '/home/example/WorkSpace/examplews/src'

sys.path.append(basepath)
sys.path.append('/home/example/WorkSpace/examplews/src/examplews')

os.environ['DJANGO_Configurations_MODULE'] = 'examplews.settings'

import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler()

And my httpd.disadvantage file, such as this:

ServerRoot "/usr/local/apache2"

Listen 80

LoadModule wsgi_module modules/mod_wsgi.so

User apache
Group apache

ServerAdmin example@domain.com

DocumentRoot "/usr/local/apache2/htdocs"

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny all
</Directory>

<Directory "/usr/local/apache2/htdocs">
Options Indexes FollowSymLinks

AllowOverride None

Order allow,deny
Allow all

</Directory>

<IfModule dir_module>
DirectoryIndex index.html index.php index.sh default.jsp
</IfModule>

<FilesMatch "^\.ht">
Order allow,deny
Deny all
Satisfy All
</FilesMatch>

ErrorLog "logs/error_log"

LogLevel warn

<IfModule log_config_module>
LogFormat "%h %l %u %t "%r" %>s %b "%i" "%i"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common

<IfModule logio_module>
LogFormat "%h %l %u %t "%r" %>s %b "%i" "%i" %I %O" combinedio
</IfModule>
CustomLog "logs/access_log" common

</IfModule>

<IfModule alias_module>
</IfModule>

<IfModule cgid_module>
</IfModule>

<IfModule wsgi_module>
WSGIScriptAlias /primary /home/example/WorkSpace/examplews/src/examplews/apache_conf/django.wsgi
</IfModule>
<Directory "/home/example/WorkSpace/examplews/src/examplews/apache_conf">
Order allow,deny
Allow all
</Directory>
DefaultType text/plain

<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>