Gitlab CSE Unil

Commit 121641e8 authored by Julien Furrer's avatar Julien Furrer
Browse files

Modifié template de config apache

Ajouté protection de l'interface d'admin
parent 4a53d3dd
......@@ -102,7 +102,7 @@
<IfModule rewrite_module>
RewriteEngine On
## Retourne une 404 pour media/protected au lien d'une 403
RewriteRule ^{{ settings.MEDIA_URL }}/ao_images/.*$ - [R=404,L,NS]
RewriteRule ^{{ settings.MEDIA_URL }}ao_images/.*$ - [R=404,L,NS]
#RewriteCond %{REMOTE_ADDR} !^130.223.3.229$
#RewriteCond %{REQUEST_URI} !^/static/.*$
......@@ -111,5 +111,20 @@
</Location>
{% endblock rewrite_protected %}
{% block rewrite_admin_protected %}
<Location "{% url "admin:index" %}">
<IfModule rewrite_module>
RewriteEngine On
## Retourne une 404 au lien d'une 403
RewriteCond %{REMOTE_ADDR} !^130.223.72.159$
RewriteRule ^.*$ - [R=404,L,NS]
</IfModule>
<IfModule !rewrite_module>
Order allow,deny
Deny from all
</IfModule>
</Location>
{% endblock rewrite_admin_protected %}
{% endblock main %}
</IfModule>
......@@ -2,6 +2,8 @@
{% block rewrite_protected %}{% endblock %}
{% block rewrite_admin_protected %}{% endblock %}
{% block wsgi %}
{% with NoDaemonProcess=0 daemon_process_name="adim" apache_user="_www" %}
{{ block.super }}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment