Gitlab CSE Unil

Commit 34d4c864 authored by Julien Furrer's avatar Julien Furrer
Browse files

màj config apache pour compat avec 24, màj settings ttp pour moodle

parent c4b33514
...@@ -102,21 +102,21 @@ ...@@ -102,21 +102,21 @@
</IfModule> </IfModule>
<Location "/adim/s-412-5/admin/"> <Location "/adim/s-412-5/admin/">
<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$ RewriteCond %{REMOTE_ADDR} !^130.223.72.159$
RewriteRule ^.*$ - [R=404,L,NS] RewriteRule ^.*$ - [R=404,L,NS]
</IfModule> </IfModule>
<IfModule !rewrite_module> <IfModule !rewrite_module>
<IfVersion >= 2.4> <IfVersion >= 2.4>
Require all denied Require all denied
</IfVersion> </IfVersion>
<IfVersion < 2.4> <IfVersion < 2.4>
Order allow,deny Order allow,deny
Deny from all Deny from all
</IfVersion> </IfVersion>
</IfModule> </IfModule>
</Location> </Location>
</IfModule> </IfModule>
...@@ -7,8 +7,13 @@ ...@@ -7,8 +7,13 @@
<Directory "/var/django/projects/adim-dev.django/adim_project/static"> <Directory "/var/django/projects/adim-dev.django/adim_project/static">
Options +FollowSymLinks -Indexes Options +FollowSymLinks -Indexes
Order deny,allow <IfVersion >= 2.4>
Allow from all Require all granted
</IfVersion>
<IfVersion < 2.4>
Order deny,allow
Allow from all
</IfVersion>
<IfModule expires_module> <IfModule expires_module>
ExpiresActive On ExpiresActive On
ExpiresDefault "access plus 10 minutes" ExpiresDefault "access plus 10 minutes"
...@@ -23,17 +28,27 @@ ...@@ -23,17 +28,27 @@
# ---------- # ----------
Alias /adim-dev/media/ "/var/django/projects/adim-dev.django/adim_project/media/" Alias /adim-dev/media/ "/var/django/projects/adim-dev.django/adim_project/media/"
<Directory "/var/django/projects/adim-dev.django/adim_project/media"> <Directory "/var/django/projects/adim-dev.django/adim_project/media">
Options +FollowSymLinks -Indexes <IfVersion >= 2.4>
Order deny,allow Require all granted
Allow from all </IfVersion>
<IfVersion < 2.4>
Order deny,allow
Allow from all
</IfVersion>
Options +FollowSymLinks +Indexes
</Directory> </Directory>
# --------------- # ---------------
# Protected Media # Protected Media
# --------------- # ---------------
<Directory "/var/django/projects/adim-dev.django/adim_project/media/ao_images/"> <Directory "/var/django/projects/adim-dev.django/adim_project/media/ao_images/">
Order allow,deny <IfVersion >= 2.4>
Deny from all Require all denied
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Deny from all
</IfVersion>
# -------------- # --------------
# XsendFile Conf # XsendFile Conf
...@@ -50,14 +65,10 @@ ...@@ -50,14 +65,10 @@
# --------------- # ---------------
<IfModule mod_shib> <IfModule mod_shib>
<Location /adim-dev/shibauth/> <Location /adim-dev/shibauth/>
#Order allow,deny
#Allow from all
AuthType shibboleth AuthType shibboleth
ShibRequireSession On ShibCompatWith24 On
ShibRedirectToSSL 443 ShibRequestSetting requireSession true
require uniqueID impossiblevaluehere@nowhere.org Require shibboleth
require valid-user
</Location> </Location>
</IfModule> </IfModule>
...@@ -72,8 +83,13 @@ ...@@ -72,8 +83,13 @@
WSGIProcessGroup adim-dev.django WSGIProcessGroup adim-dev.django
WSGIPassAuthorization On WSGIPassAuthorization On
<Files wsgi.py> <Files wsgi.py>
Order deny,allow <IfVersion >= 2.4>
Allow from all Require all granted
</IfVersion>
<IfVersion < 2.4>
Order deny,allow
Allow from all
</IfVersion>
</Files> </Files>
</Directory> </Directory>
...@@ -83,23 +99,24 @@ ...@@ -83,23 +99,24 @@
RewriteEngine On RewriteEngine On
## Retourne une 404 pour media/protected au lien d'une 403 ## Retourne une 404 pour media/protected au lien d'une 403
RewriteRule ^/adim-dev/media/ao_images/.*$ - [R=404,L,NS] RewriteRule ^/adim-dev/media/ao_images/.*$ - [R=404,L,NS]
#RewriteCond %{REMOTE_ADDR} !^130.223.3.229$
#RewriteCond %{REQUEST_URI} !^/static/.*$
#RewriteRule ^.*$ /maintenance.html
</IfModule> </IfModule>
<Location "/adim-dev/s-412-5/admin/"> <Location "/adim-dev/s-412-5/admin/">
<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$ RewriteCond %{REMOTE_ADDR} !^130.223.72.159$
RewriteRule ^.*$ - [R=404,L,NS] RewriteRule ^.*$ - [R=404,L,NS]
</IfModule> </IfModule>
<IfModule !rewrite_module> <IfModule !rewrite_module>
Order allow,deny <IfVersion >= 2.4>
Deny from all Require all denied
</IfModule> </IfVersion>
<IfVersion < 2.4>
Order allow,deny
Deny from all
</IfVersion>
</IfModule>
</Location> </Location>
</IfModule> </IfModule>
...@@ -271,7 +271,7 @@ ATTP = { ...@@ -271,7 +271,7 @@ ATTP = {
'CACHE_TIMEOUT': 20, # 30, 'CACHE_TIMEOUT': 20, # 30,
}, },
'moodle': { 'moodle': {
'CHECK_URL': "http://tstmoodle.unil.ch/29/mod/adim/checkAccess.php?uuid={uuid}", 'CHECK_URL': "http://moodle2.unil.ch/mod/adim/checkAccess.php?uuid={uuid}",
'MODE_ID': 16 'MODE_ID': 16
}, },
'toto': { 'toto': {
......
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