Gitlab CSE Unil

Commit 9757700f authored by Julien Furrer's avatar Julien Furrer
Browse files

Suite fix config deploy

parent 495ed2ee
......@@ -3,9 +3,9 @@
## ------------
## Static paths
## ------------
Alias /static/ "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/static/"
<Directory "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/static">
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
Allow from all
......@@ -21,8 +21,8 @@
# ----------
# Media path
# ----------
Alias /media/ "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/media/"
<Directory "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/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">
Options +FollowSymLinks -Indexes
Order deny,allow
Allow from all
......@@ -31,25 +31,25 @@
# ---------------
# Protected Media
# ---------------
<Directory "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/media/ao_images/">
<Directory "/var/django/projects/adim.django/adim_project/media/ao_images/">
Order allow,deny
Deny from all
# --------------
# XsendFile Conf
# --------------
<IfModule xsendfile_module>
XSendFile On
XSendFilePath "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/media"
XSendFilePath "/var/django/projects/adim.django/adim_project/media"
</IfModule>
</Directory>
# ---------------
# Shibboleth Conf
# ---------------
<IfModule mod_shib>
<Location //shibauth/>
<Location /adim/shibauth/>
#Order allow,deny
#Allow from all
AuthType shibboleth
......@@ -61,4 +61,34 @@
</Location>
</IfModule>
</IfModule>
# ---------
# WSGI conf
# ---------
WSGIDaemonProcess adim.django user=www-data group=www-data
WSGIScriptAlias /adim/ "/var/django/projects/adim.django/adim_project/adim_project/wsgi.py"
<Directory "/var/django/projects/adim.django/adim_project/adim_project">
WSGIProcessGroup adim.django
WSGIPassAuthorization On
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
RedirectMatch ^/adim$ /adim/
<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>
</Location>
</IfModule>
\ No newline at end of file
......@@ -3,9 +3,9 @@
## ------------
## Static paths
## ------------
Alias /static/ "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/static/"
<Directory "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/static">
Alias /adim-dev/static/ "/var/django/projects/adim-dev.django/adim_project/static/"
<Directory "/var/django/projects/adim-dev.django/adim_project/static">
Options +FollowSymLinks -Indexes
Order deny,allow
Allow from all
......@@ -21,8 +21,8 @@
# ----------
# Media path
# ----------
Alias /media/ "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/media/"
<Directory "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/media">
Alias /adim-dev/media/ "/var/django/projects/adim-dev.django/adim_project/media/"
<Directory "/var/django/projects/adim-dev.django/adim_project/media">
Options +FollowSymLinks -Indexes
Order deny,allow
Allow from all
......@@ -31,25 +31,25 @@
# ---------------
# Protected Media
# ---------------
<Directory "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/media/ao_images/">
<Directory "/var/django/projects/adim-dev.django/adim_project/media/ao_images/">
Order allow,deny
Deny from all
# --------------
# XsendFile Conf
# --------------
<IfModule xsendfile_module>
XSendFile On
XSendFilePath "/Users/jfurrer/JOB/___RISET/PROJECTS/Misc/AnnotationDImage/workspace/adim.django/adim_project/media"
XSendFilePath "/var/django/projects/adim-dev.django/adim_project/media"
</IfModule>
</Directory>
# ---------------
# Shibboleth Conf
# ---------------
<IfModule mod_shib>
<Location //shibauth/>
<Location /adim-dev/shibauth/>
#Order allow,deny
#Allow from all
AuthType shibboleth
......@@ -61,4 +61,35 @@
</Location>
</IfModule>
# ---------
# WSGI conf
# ---------
WSGIDaemonProcess adim-dev.django user=www-data group=www-data
WSGIScriptAlias /adim-dev/ "/var/django/projects/adim-dev.django/adim_project/adim_project/wsgi.py"
<Directory "/var/django/projects/adim-dev.django/adim_project/adim_project">
WSGIProcessGroup adim-dev.django
WSGIPassAuthorization On
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
RedirectMatch ^/adim-dev$ /adim-dev/
<Location "/adim-dev/">
<IfModule rewrite_module>
RewriteEngine On
## Retourne une 404 pour media/protected au lien d'une 403
RewriteRule ^/adim-dev/media//ao_images/.*$ - [R=404,L,NS]
#RewriteCond %{REMOTE_ADDR} !^130.223.3.229$
#RewriteCond %{REQUEST_URI} !^/static/.*$
#RewriteRule ^.*$ /maintenance.html
</IfModule>
</Location>
</IfModule>
......@@ -102,7 +102,7 @@
<IfModule rewrite_module>
RewriteEngine On
## Retourne une 404 pour media/protected au lien d'une 403
RewriteRule ^{{ settings.MEDIA_ROOT }}/ao_images/.*$ - [R=404,L,NS]
RewriteRule ^{{ settings.MEDIA_URL }}/ao_images/.*$ - [R=404,L,NS]
#RewriteCond %{REMOTE_ADDR} !^130.223.3.229$
#RewriteCond %{REQUEST_URI} !^/static/.*$
......
{% extends "apache_config/base.conf" %}
{% block rewrite_protected %}{% endblock %}
{% block wsgi %}
{% with NoDaemonProcess=0 daemon_process_name="adim-dev" apache_user="www-data"%}
{% with NoDaemonProcess=0 daemon_process_name="adim-dev" apache_user="www-data" %}
{{ block.super }}
{% endwith %}
{% endblock %}
Markdown is supported
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