wsgi config

0 views
Skip to first unread message

knight

unread,
Nov 9, 2009, 2:37:18 AM11/9/09
to Django users
Hi. I have a problem with configuring my django site with mod_wsgi.
My httpd.conf is:


LoadModule wsgi_module modules/mod-wsgi.so
WSGIScriptAlias /peergw C:/mxhw/mx30/django.wsgi

<Directory C:/mxhw/mx30>
Order deny,allow
allow from all
</Directory>

Alias /media/ "C:\Program Files\Apache Software Foundation
\Apache2.2\htdocs\media"
Alias /peergw/site_media/ "C:\Program Files\Apache Software Foundation
\Apache2.2\htdocs\site_media"

<Directory "C:\Program Files\Apache Software Foundation
\Apache2.2\htdocs">
Order deny,allow
Allow from all
</Directory>


I want my site to run on /peergw since I have many instances on the
server and each one running with the different prefix.
Everything works fine except all the images - I can't see static media
files both in admin and my site.
When I go to "/site_media/..../image" and not "/peergw/site_media/..../
image", I do see the image.
What am I doing wrong?
By the way, I'm running on Vista, but I have the same problem on XP.

Thanks, Arshavski Alexander.


Angel Cruz

unread,
Nov 10, 2009, 5:31:46 PM11/10/09
to django...@googlegroups.com
Maybe the backslash is a problem.

Here is how my media alias looks like:

Alias /media/ "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/django/media/"
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/django/media/">
Order allow,deny
Allow from all
</Directory>

knight

unread,
Nov 11, 2009, 3:32:12 AM11/11/09
to Django users
Hi,

Thanks for the reply.It helps for the admin media.
But my site_media (static files) still don't work.
Do you have another idea what my problem is?

Thanks, Arshavski Alexander.

Angel Cruz

unread,
Nov 12, 2009, 11:49:03 AM11/12/09
to django...@googlegroups.com
Does it look like this now?  This should work:

Alias /media/ "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/media/"

<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/media/">

Order allow,deny
Allow from all
</Directory>


Alias /peergw/site_media/ "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/site_media/"

<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/site_media/">

Order allow,deny
Allow from all
</Directory>


<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
Order deny,allow
Allow from all
</Directory>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com
To unsubscribe from this group, send email to django-users...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Angel Cruz

unread,
Nov 12, 2009, 11:54:54 AM11/12/09
to django...@googlegroups.com
BTW,
Aliases are usually one word and so I would have aliased your site media as:

Alias /site_media/ "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/
site_media/"
Reply all
Reply to author
Forward
0 new messages