Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In ssl_default.conf where Apache serves as an SSL-adding proxy for Django Gunicorn, I have:

    ...
    Alias /admin/static/ "/usr/lib/python2.7/dist-packages/django/contrib/admin/static/"

    ProxyPass /media/ !
    ProxyPass /admin/static/ !
    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/

What should I be doing differently to have /admin/static/* serving up the contents of the URL above? At present it appears to be handing requests, including /admin/static/*, to the Django Gunicorn process.

UPDATE

Now I'm getting a 403 after expanding:

    Alias /admin/static/ "/usr/lib/python2.7/dist-packages/django/contrib/admin/static/"
    <Directory "/usr/lib/python2.7/dist-packages/django/controb/admin/static/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

This is on attempting to access /admin/static/css/base.css.

Suggestions?

share|improve this question
    
Check your error.log. It may be possible that the alias overlaps and therefore will never match; look for errors like The Alias directive in ... at line ... will probably never match because it overlaps an earlier Alias. –  Martin von Wittich Jan 27 at 18:41
    
I didn't see anything current in the error log; and Apache from the UI is not reporting an error, just handing the request to Django as would be appropriate if I weren't trying to alias a directory. –  JonathanHayward Jan 27 at 18:48
    
Could it be the trailing slash? stackoverflow.com/questions/13189261/… –  Martin von Wittich Jan 27 at 18:53
    
I'm not saying that I shouldn't change that, but I have only attempted to see it by adding a trailing slash. That is, I haven't attempted to access /admin/static, only /admin/static/*. –  JonathanHayward Jan 27 at 18:57
    
Breadcrumb note: I wrong "controb" for "contrib" in the Directory tab. However, fixing that did not seem to solve the problem. –  JonathanHayward Jan 27 at 21:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.