On 20 April 2010 00:00, dononyx <[email protected]> wrote:
> Thanks for the rapid response. I took out the Include statement and
> Apache started again. I am doing something wrong though as the site
> does not acknowledge wsgi is working. The site is www.teachingbystandards.com
> and the Login Gives
>
> Not Found
>
> The requested URL /ess/accounts/login was not found on this server.

Using WSGIScriptAlias at '/' will override anything you have in
DocumentRoot, so if that URL was something outside of Django to being
with, you are going to have to add in additional Alias directives
which map into DocumentRoot for that URL for it to work.

> Additionally, a 404 Not Found error was encountered while trying to
> use an ErrorDocument to handle the request.

This is likely because you had Apache multi language error documents
enabled or had explicitly set ErrorDocument to some custom error page
and that special error document URL is now being routed to Django as
well and Django doesn't know what to do to that URL.

What was the Apache web server instance serving up before you tried
mounting Django at the root of the site?

Graham

> Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.7l DAV/2 mod_wsgi/3.2
> Python/2.5.1 mod_jk/1.2.23 PHP/5.2.4 Server at www.teachingbystandards.com
> Port 80
>
> My Config is
>
> LoadModule wsgi_module libexec/apache2/mod_wsgi.so
>
>
> NameVirtualHost *:80
>
> <VirtualHost *:80>
> ServerName teachingbystandards.com
> ServerAlias www.teachingbystandards.com
>
> Alias /media /Library/WebServer/Documents/ess/media
>
> <Directory /Library/WebServer/Documents/ess/media>
>        Order allow,deny
>        Allow from all
> </Directory>
>
> Alias /media_files /Library/WebServer/Documents/ess/media_files
>
> <Directory "/Library/WebServer/Documents/ess/media_files">
> Order allow,deny
> Allow from all
> </Directory>
>
> WSGIScriptAlias / /Library/WebServer/Documents/ess/apache/
> ess_wsgi.wsgi
>
> <Directory "/Library/WebServer/Documents/ess/apache">
> Order deny,allow
> Allow from all
> </Directory>
>
> WSGIDaemonProcess ess maximum-requests=2000 threads=10
> WSGIProcessGroup ess
>
> </VirtualHost>
>
>
> On Apr 18, 10:38 pm, Graham Dumpleton <[email protected]>
> wrote:
>> On 19 April 2010 13:31, dononyx <[email protected]> wrote:
>>
>>
>>
>>
>>
>> > Leopard Server 10.5.8, mod_wsgi 3.2
>> > otool works
>> > file works like other posts.
>> > My problem is that Apache throws an error when I Include the
>> > ess_wsgi.wsgi file which is:
>> > #!/usr/bin/python
>> > import os, sys
>> > sys.path.append('/Library/WebServer/Documents')
>> > sys.path.append('Library/WebServer/Documents/ess')
>>
>> > os.environ['DJANGO_SETTINGS_MODULE'] = 'ess.settings'
>>
>> > from django.core.handlers.wsgi import WSGIHandler
>>
>> > application = WSGIHandler()
>>
>> > I get a Syntax error on line 2.
>> > Invalid command 'import', perhaps misspelled or defined by a module
>> > not included in the server configuration??
>> > Any ideas, I Included the file?
>>
>> That error would suggest you are including the .wsgi file in the
>> Apache configuration file directly somehow, perhaps using 'Include'
>> directive. You shouldn't be doing that.
>>
>> Post what you are putting in your Apache configuration. Make sure you read:
>>
>>  http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide
>>  http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
>>
>> Graham
>>
>> Graham
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "modwsgi" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to 
>> [email protected].
>> For more options, visit this group 
>> athttp://groups.google.com/group/modwsgi?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/modwsgi?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to