Even if VirtualHost causing problem one would get 404 because:

/Users/corinemorin/Desktop

has permissions:

 0 drwx------+ 27 graham  staff    918 18 Jan 13:44 Desktop

on a Mac and so Apache user can't see into the directory.

Graham

On 21 January 2011 07:19, Graham Dumpleton <[email protected]> wrote:
> On 21 January 2011 06:46, cocobuster <[email protected]> wrote:
>> Hi,
>>
>>   I am trying to install and activate mod_wsgi. I have made a example
>> project to validate that mod_wsgi was working properly before I can
>> use it for a larger django project. The issue is that I am getting a
>> 404 on url:http://www.example.com/mysite. I have read tones of
>> tutorial but still I am unable to have this simple pdjango project to
>> run. Can someone help me completing mod_wsgi installation and assure
>> it is activated.
>>
>> Here are my setting:
>> Operating system: Mac 10.6.6
>> Python 2.6
>> Apache is running: I use >> apachectl start (or stop) (http://
>> 127.0.0.1/ is also showing a default page)
>> Django 1.2.1
>> I installed mod_wsgo using:http://wiki.chrisgilmer.net/index.php?
>> title=Django_with_Apache_and_mod_wsgi
>>
>> Project Info:
>> Project resides: /Users/corinemorin/Desktop/milkyway/mysite
>> wsgi settings resides:  /Users/corinemorin/Desktop/milkyway/mysite/
>> apache
>> In the apache folder you find 2 files: apache_django_wsgi.conf and
>> django.wsgi
>>
>> -------  apache_django_wsgi.conf file content -------
>> <VirtualHost *:80>
>>
>>    ServerName 127.0.0.1
>>    ServerAlias 127.0.0.1
>>    ServerAdmin [email protected]
>>
>>    DocumentRoot /Users/corinemorin/Desktop/milkyway/mysite/
>>
>>    <Directory /Users/corinemorin/Desktop/milkyway/mysite>
>>    Order allow,deny
>>    Allow from all
>>    </Directory>
>>
>>    WSGIScriptAlias /mysite /Users/corinemorin/Desktop/milkyway/mysite/
>> apache/django.wsgi
>>
>>   <Directory /Users/corinemorin/Desktop/milkyway/mysite/apache>
>>    Order deny,allow
>>    Allow from all
>>  </Directory>
>>
>> </VirtualHost>
>
> You can't use IP address for ServerName. Just get rid of the
> VirtualHost container and use just:
>
>  WSGIScriptAlias /mysite
> /Users/corinemorin/Desktop/milkyway/mysite/apache/django.wsgi
>
>  <Directory /Users/corinemorin/Desktop/milkyway/mysite/apache>
>   Order deny,allow
>   Allow from all
>  </Directory>
>
> Add an Alias directory for static media as appropriate. See:
>
> http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
>
> Graham
>
>> --------   django.wsgi  file content  ---------
>> import os, sys
>> sys.path.append('/Users/corinemorin/Desktop/milkyway')
>> sys.path.append('/Users/corinemorin/Desktop/milkyway/mysite')
>>
>> os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
>>
>> import django.core.handlers.wsgi
>> application = django.core.handlers.wsgi.WSGIHandler()
>>
>>
>> ---------- /etc/apache2/httpd.conf file content-------------------
>> I added these 2 lines:
>>
>> LoadModule wsgi_module libexec/apache2/mod_wsgi.so
>>
>> Include /Users/corinemorin/Desktop/milkyway/mysite/apache/
>> apache_django_wsgi.conf
>>
>>
>>
>> The running http://127.0.0.1/mysite/ or http://127.0.0.1/mysite   will
>> give me the following message:
>> Not Found
>> The requested URL /mysite was not found on this server.
>>
>> How can I run my django app under http://127.0.0.1/mysite/ ? Which
>> settings do I got wrong, what I am missing to make this works,
>>
>> thank you for your help,
>> Corine
>>
>> --
>> 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