AliasMatch in httpd.conf with django admin

I have a problem with Alias ​​in apache with django. In my wsgi.conf, I have the following alias:

Alias /admin/static/ /opt/python/current/app/django_eb/static/
<Directory /opt/python/current/app/django_eb/static>
  Require all granted
</Directory>

The alias works fine, but in my django admin I only get statics on some pages. The problem is with the alias pool because the django administrator includes additional parts of the URL according to the section. The following example:

http://blablabla.com/admin/**auth/group**/static/admin/css/base.css/

For each django application, additional information is added to the URL and the alias cannot be resolved. Is there a way to match this situation using AliasMatch instead of Alias?

I believe that I can manually map each additional path with a simple alias, but this is not an efficient and convenient solution ...

Thanks!!

+4
1

. STATIC_URL , /static/? , Alias /static/ /opt/python/current/app/django_eb/static/ collectstatic.                   – Nostalg.io

, STATIC_URL, static/. /static/, - rdiaz82

0

Source: https://habr.com/ru/post/1622055/


All Articles