Gitlab CSE Unil

Commit c4b33514 authored by Julien Furrer's avatar Julien Furrer
Browse files

update config apache prod

parent b223a426
...@@ -7,8 +7,13 @@ ...@@ -7,8 +7,13 @@
<Directory "/var/django/projects/adim.django/adim_project/static"> <Directory "/var/django/projects/adim.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/media/ "/var/django/projects/adim.django/adim_project/media/" Alias /adim/media/ "/var/django/projects/adim.django/adim_project/media/"
<Directory "/var/django/projects/adim.django/adim_project/media"> <Directory "/var/django/projects/adim.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.django/adim_project/media/ao_images/"> <Directory "/var/django/projects/adim.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/shibauth/> <Location /adim/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.django WSGIProcessGroup adim.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,10 +99,6 @@ ...@@ -83,10 +99,6 @@
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/media/ao_images/.*$ - [R=404,L,NS] RewriteRule ^/adim/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/s-412-5/admin/"> <Location "/adim/s-412-5/admin/">
...@@ -97,9 +109,14 @@ ...@@ -97,9 +109,14 @@
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>
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