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