On 8/01/2010 2:13am, Stephen Emslie wrote:
Looks like the regular expression of the AliasMatch excludes any '/'
characters in the pattern, so is only going to match the last part of the
path.
Or roughly equivalent to doing path.split('/')[-1].
does the following work?
AliasMatch /(.*\.js) /srv/www/ccm/htdocs/static/js/$1
Thanks Stephen
I really want the match string to start with a / hence ^/ and then any
character . (including more slashes) one or more times + and ending in
\.js so I reckon it should be ^/.+\.js
AliasMatch (^/.+\.js) /srv/www/ccm/htdocs/static/js/$1
This is now finding tiny_mce according to FireBug BUT it isn't
displaying the usual editing controls so there must be something else amiss.
Back to the drawing board I guess
Thanks
Mike
On Thu, Jan 7, 2010 at 12:48 PM, Mike Dewhirst<mi...@dewhirst.com.au>wrote:
I want to serve development code from SuSE 11.1 using Apache 2.2 with
mod_wsgi in parallel with the Django server on WinXP.
It works - except I have obviously outsmarted myself configuring Apache to
serve javascript. In particular tiny_mce.js.
As an example, here is part of my
../templates/admin/flatpages/flatpage/change_form.html ...
- - - - - - - -
<script type="text/javascript" src="/tiny_mce/tiny_mce.js"></script>
- - - - - - - -
Here is part of my settings.py ...
- - - - - - - -
MEDIA_URL = '/static/'
MEDIA_ROOT = os.path.dirname(PROJECT_ROOT) + '/htdocs/static/'
- - - - - - - -
This PROJECT_ROOT is derived from os.path.dirname(__file__) which makes the
root slightly different between WinXP Django dev server and SuSE Apache
server
Here is part of my Apache conf ...
- - - - - - - -
AliasMatch /([^/]*\.js) /srv/www/ccm/htdocs/static/js/$1
- - - - - - - -
... which I thought would match "/tiny_mce/tiny_mce.js" from the above
changeform.html snippet for Apache to find that script where it actually
lives in
/srv/www/ccm/htdocs/static/js/tiny_mce/tiny_mce.js
BUT according to the errorlog Apache is actually looking in
/srv/www/ccm/htdocs/static/js/tiny_mce.js
On the WinXP dev server tiny_mce works fine based on the above MEDIA_URL
and MEDIA_ROOT.
Any hints, pointers or docco links gratefully followed
Thanks
Mike
--
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<django-users%2bunsubscr...@googlegroups.com>
.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
--
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 at
http://groups.google.com/group/django-users?hl=en.