Gitlab CSE Unil

Commit 906cf465 authored by Julien Furrer's avatar Julien Furrer
Browse files

Ajusté config apache pour protection admin

L'url admin est accessible pour toutes les IP internes (settings.INTERNAL_IPS)
parent 375ae0c5
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
## ------------ ## ------------
## Static paths ## Static paths
## ------------ ## ------------
Alias /adim-dev/static/ "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/static/" Alias /static/ "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/static/"
<Directory "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/static"> <Directory "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/static">
Options +FollowSymLinks -Indexes Options +FollowSymLinks -Indexes
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
# ---------- # ----------
# Media path # Media path
# ---------- # ----------
Alias /adim-dev/media/ "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/media/" Alias /media/ "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/media/"
<Directory "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/media"> <Directory "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/media">
Options +FollowSymLinks -Indexes Options +FollowSymLinks -Indexes
Order deny,allow Order deny,allow
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
# Shibboleth Conf # Shibboleth Conf
# --------------- # ---------------
<IfModule mod_shib> <IfModule mod_shib>
<Location /adim-dev/shibauth/> <Location /shibauth/>
#Order allow,deny #Order allow,deny
#Allow from all #Allow from all
AuthType shibboleth AuthType shibboleth
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
WSGIDaemonProcess adim.django user=_www group=_www WSGIDaemonProcess adim.django user=_www group=_www
WSGIScriptAlias /adim-dev "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/adim_project/wsgi/local.py" WSGIScriptAlias / "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/adim_project/wsgi/local.py"
<Directory "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/adim_project"> <Directory "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/adim_project">
WSGIProcessGroup adim.django WSGIProcessGroup adim.django
WSGIPassAuthorization On WSGIPassAuthorization On
...@@ -77,6 +77,4 @@ ...@@ -77,6 +77,4 @@
</Files> </Files>
</Directory> </Directory>
RedirectMatch ^/adim-dev$ /adim-dev/
</IfModule> </IfModule>
...@@ -114,7 +114,8 @@ ...@@ -114,7 +114,8 @@
<IfModule rewrite_module> <IfModule rewrite_module>
RewriteEngine On RewriteEngine On
## Retourne une 404 au lien d'une 403 ## Retourne une 404 au lien d'une 403
RewriteCond %{REMOTE_ADDR} !^130.223.72.159$ {% for ip in settings.INTERNAL_IPS %}
RewriteCond %{REMOTE_ADDR} !^{{ ip }}${% endfor %}
RewriteRule ^.*$ - [R=404,L,NS] RewriteRule ^.*$ - [R=404,L,NS]
</IfModule> </IfModule>
<IfModule !rewrite_module> <IfModule !rewrite_module>
......
Supports Markdown
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