Gitlab CSE Unil
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
M. Chardon
ADIM
Commits
e124b0ee
Commit
e124b0ee
authored
Mar 14, 2016
by
Julien Furrer
Browse files
Ajusté settings pour servir médias depuis nas
parent
92c34198
Changes
2
Hide whitespace changes
Inline
Side-by-side
adim_project/adim_project/apache/production.conf
View file @
e124b0ee
...
...
@@ -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
>
Require
all
denied
</
IfVersion
>
<
IfVersion
<
2
.
4
>
Order
allow
,
deny
Deny
from
all
</
IfVersion
>
<
Directory
"/nas/data/adim/media/ao_images/"
>
Require
all
denied
# --------------
# 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
>
...
...
adim_project/adim_project/settings/production.py
View file @
e124b0ee
...
...
@@ -3,6 +3,7 @@ Settings for production server
"""
from
.base
import
*
MEDIA_ROOT
=
'/nas/data/adim/media'
update_urls
(
'/adim/'
,
__name__
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment