Gitlab CSE Unil

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

Ajusté settings pour servir médias depuis nas

parent 92c34198
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
# ---------- # ----------
# Media path # Media path
# ---------- # ----------
Alias /adim/media/ "/var/django/projects/adim.django/adim_project/media/" Alias /adim/media/ "/nas/data/adim/media/"
<Directory "/var/django/projects/adim.django/adim_project/media"> <Directory "/nas/data/adim/media">
<IfVersion >= 2.4> <IfVersion >= 2.4>
Require all granted Require all granted
</IfVersion> </IfVersion>
...@@ -41,21 +41,15 @@ ...@@ -41,21 +41,15 @@
# --------------- # ---------------
# Protected Media # Protected Media
# --------------- # ---------------
<Directory "/var/django/projects/adim.django/adim_project/media/ao_images/"> <Directory "/nas/data/adim/media/ao_images/">
<IfVersion >= 2.4> Require all denied
Require all denied
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Deny from all
</IfVersion>
# -------------- # --------------
# XsendFile Conf # XsendFile Conf
# -------------- # --------------
<IfModule xsendfile_module> <IfModule xsendfile_module>
XSendFile On XSendFile On
XSendFilePath "/var/django/projects/adim.django/adim_project/media" XSendFilePath "/nas/data/adim/media/"
</IfModule> </IfModule>
</Directory> </Directory>
...@@ -66,7 +60,7 @@ ...@@ -66,7 +60,7 @@
<IfModule mod_shib> <IfModule mod_shib>
<Location /adim/shibauth/> <Location /adim/shibauth/>
AuthType shibboleth AuthType shibboleth
ShibCompatWith24 On #ShibCompatWith24 On
ShibRequestSetting requireSession true ShibRequestSetting requireSession true
Require shibboleth Require shibboleth
</Location> </Location>
...@@ -79,10 +73,10 @@ ...@@ -79,10 +73,10 @@
WSGIDaemonProcess adim.django user=www-data group=www-data WSGIDaemonProcess adim.django user=www-data group=www-data
WSGIScriptAlias /adim "/var/django/projects/adim.django/adim_project/adim_project/wsgi/production.py" WSGIScriptAlias /adim "/var/django/projects/adim.django/adim_project/adim_project/wsgi/production.py"
<Directory "/var/django/projects/adim.django/adim_project/adim_project"> <Directory "/var/django/projects/adim.django/adim_project/adim_project/wsgi">
WSGIProcessGroup adim.django WSGIProcessGroup adim.django
WSGIPassAuthorization On WSGIPassAuthorization On
<Files wsgi.py> # <Files wsgi.py>
<IfVersion >= 2.4> <IfVersion >= 2.4>
Require all granted Require all granted
</IfVersion> </IfVersion>
...@@ -90,7 +84,7 @@ ...@@ -90,7 +84,7 @@
Order deny,allow Order deny,allow
Allow from all Allow from all
</IfVersion> </IfVersion>
</Files> # </Files>
</Directory> </Directory>
RedirectMatch ^/adim$ /adim/ RedirectMatch ^/adim$ /adim/
...@@ -106,6 +100,7 @@ ...@@ -106,6 +100,7 @@
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$
RewriteCond %{REMOTE_ADDR} !^130.223.\d+\.\d+.$
RewriteRule ^.*$ - [R=404,L,NS] RewriteRule ^.*$ - [R=404,L,NS]
</IfModule> </IfModule>
<IfModule !rewrite_module> <IfModule !rewrite_module>
......
...@@ -3,6 +3,7 @@ Settings for production server ...@@ -3,6 +3,7 @@ Settings for production server
""" """
from .base import * from .base import *
MEDIA_ROOT = '/nas/data/adim/media'
update_urls('/adim/', __name__) update_urls('/adim/', __name__)
......
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