Gitlab CSE Unil

Commit 0df33796 authored by Julien Furrer's avatar Julien Furrer
Browse files

màj config apache production

parent c8bd8d64
......@@ -4,7 +4,7 @@
## Static paths
## ------------
Alias /adim/static/ "/var/django/projects/adim.django/adim_project/static/"
<Directory "/var/django/projects/adim.django/adim_project/static">
Options +FollowSymLinks -Indexes
Order deny,allow
......@@ -34,7 +34,7 @@
<Directory "/var/django/projects/adim.django/adim_project/media/ao_images/">
Order allow,deny
Deny from all
# --------------
# XsendFile Conf
# --------------
......@@ -42,7 +42,7 @@
XSendFile On
XSendFilePath "/var/django/projects/adim.django/adim_project/media"
</IfModule>
</Directory>
# ---------------
......@@ -76,19 +76,30 @@
Allow from all
</Files>
</Directory>
RedirectMatch ^/adim$ /adim/
<IfModule rewrite_module>
RewriteEngine On
## Retourne une 404 pour media/protected au lien d'une 403
RewriteRule ^/adim/media/ao_images/.*$ - [R=404,L,NS]
<Location "/adim/">
<IfModule rewrite_module>
RewriteEngine On
## Retourne une 404 pour media/protected au lien d'une 403
RewriteRule ^/adim/media//ao_images/.*$ - [R=404,L,NS]
#RewriteCond %{REMOTE_ADDR} !^130.223.3.229$
#RewriteCond %{REQUEST_URI} !^/static/.*$
#RewriteRule ^.*$ /maintenance.html
</IfModule>
#RewriteCond %{REMOTE_ADDR} !^130.223.3.229$
#RewriteCond %{REQUEST_URI} !^/static/.*$
#RewriteRule ^.*$ /maintenance.html
</IfModule>
<Location "/adim/s-412-5/admin/">
<IfModule rewrite_module>
RewriteEngine On
## Retourne une 404 au lien d'une 403
RewriteCond %{REMOTE_ADDR} !^130.223.72.159$
RewriteRule ^.*$ - [R=404,L,NS]
</IfModule>
<IfModule !rewrite_module>
Order allow,deny
Deny from all
</IfModule>
</Location>
</IfModule>
\ No newline at end of file
</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