Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » What Does Access Log Imply About Media Files' Location [RSS Feed]

#1 Dec. 2, 2010 19:24:30

o.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

What Does Access Log Imply About Media Files' Location


In my muddling around working on two problems involving serving media
pages, I have both problems narrowed down to similar 404 entries in
access_log (apache/mod_python).

10.100.0.88 - - "GET /media/admin/media/
css/base.cs
s HTTP/1.1" 404 2343 "http://amrserver:8002/admin/";

My question is why is the path GET from access_log (below) wrong?

base.css and other admin files are located in /home/amr/django/amr/
media/admin/media/css.

apache configuration
------------------------------
Listen 8002
<VirtualHost _default_:8002>

<Directory "/home/amr/django/amr/media/admin/media">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

Alias /media/ "/home/amr/django/amr/media/admin/media/"

<Location />
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE settings
SetEnv PYTHON_EGG_CACHE /tmp/.python_eggs
PythonOption django.root /home/amr/django/amr
PythonPath " +
sys.path"

PythonDebug On
</Location>

</VirtualHost>
------------------------------
Pertinent settings from settings.py
--------------------------------------------------
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = '/home/amr/django/amr/media'

# URL that handles the media served from MEDIA_ROOT. Make sure to use
a
# trailing slash if there is a path component (optional in other
cases).
# Examples: "http://media.lawrence.com";, "http://example.com/media/";
MEDIA_URL = '/media/'

# URL prefix for admin media -- CSS, JavaScript and images. Make sure
to use a
# trailing slash.
# Examples: "http://foo.com/media/";, "/media/".

ADMIN_MEDIA_PREFIX = '/media/admin/media/'
-------------------------------------------------------------------------

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

Offline

  • Root
  • » Django
  • » What Does Access Log Imply About Media Files' Location [RSS Feed]

Board footer

Moderator control

Enjoy the 23rd of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support