Server synchronisation
This commit is contained in:
parent
4b101ef4b2
commit
bbec08ac4f
6 changed files with 218 additions and 18 deletions
41
nginx.conf
41
nginx.conf
|
|
@ -13,23 +13,44 @@ server {
|
|||
ssl_prefer_server_ciphers on;
|
||||
ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:!ADH:!AECDH:!MD5:!DSS;
|
||||
ssl_client_certificate /var/www/fic2014-server/misc/pki/cacert.crt;
|
||||
ssl_verify_client on;
|
||||
add_header Strict-Transport-Security "max-age=2592000; includeSubdomains";
|
||||
ssl_verify_client optional;
|
||||
ssl_crl /var/www/fic2014-server/misc/pki/crl.pem;
|
||||
|
||||
add_header Strict-Transport-Security "max-age=2592000; includeSubdomains";
|
||||
|
||||
location /
|
||||
{
|
||||
default_type text/html;
|
||||
if ($ssl_client_s_dn !~ "/C=FR/ST=France/O=Epita/OU=SRS/")
|
||||
{
|
||||
return 401;
|
||||
}
|
||||
|
||||
if ($ssl_client_s_dn ~ "/C=FR/ST=France/O=Epita/OU=SRS/CN=Team1/") {
|
||||
root /var/www/fic2014-server/htdocs/connected/166$1;
|
||||
set $team 0;
|
||||
|
||||
rewrite ^/submission-([0-9]+)-([0-9]+).html$ /submission.php?team=166&theme=$1&exercice=$2 last;
|
||||
if ($ssl_client_s_dn ~ "/C=FR/ST=France/O=Epita/OU=SRS/CN=bombal_s/") { set $team 161; }
|
||||
if ($ssl_client_s_dn ~ "/C=FR/ST=France/O=Epita/OU=SRS/CN=Groupe_1/") { set $team 166; }
|
||||
if ($ssl_client_s_dn ~ "/C=FR/ST=France/O=Epita/OU=SRS/CN=Groupe_2/") { set $team 167; }
|
||||
if ($ssl_client_s_dn ~ "/C=FR/ST=France/O=Epita/OU=SRS/CN=Groupe_3/") { set $team 168; }
|
||||
if ($ssl_client_s_dn ~ "/C=FR/ST=France/O=Epita/OU=SRS/CN=Groupe_4/") { set $team 169; }
|
||||
if ($ssl_client_s_dn ~ "/C=FR/ST=France/O=Epita/OU=SRS/CN=Groupe_5/") { set $team 170; }
|
||||
if ($ssl_client_s_dn ~ "/C=FR/ST=France/O=Epita/OU=SRS/CN=Groupe_6/") { set $team 171; }
|
||||
if ($ssl_client_s_dn ~ "/C=FR/ST=France/O=Epita/OU=SRS/CN=Groupe_7/") { set $team 172; }
|
||||
if ($ssl_client_s_dn ~ "/C=FR/ST=France/O=Epita/OU=SRS/CN=Groupe_8/") { set $team 173; }
|
||||
|
||||
if ($team) {
|
||||
root /var/www/fic2014-server/teams/$team$1;
|
||||
rewrite ^/submission-([0-9]+)-([a-zA-Z0-9_]+).html$ /submission.php?team=$team&theme=$1&exercice=$2 last;
|
||||
}
|
||||
if ($team = 0) {
|
||||
root /var/www/fic2014-server/htdocs/;
|
||||
}
|
||||
}
|
||||
|
||||
location /connected
|
||||
{
|
||||
return 403;
|
||||
}
|
||||
|
||||
location /files
|
||||
{
|
||||
root /var/www/fic2014-server/;
|
||||
}
|
||||
|
||||
location ~* \favicon.ico$ {
|
||||
|
|
@ -38,7 +59,7 @@ server {
|
|||
add_header Cache-Control public;
|
||||
}
|
||||
|
||||
location ~ ^/(img|js|css)/ {
|
||||
location ~ ^/(img|js|css|fonts)/ {
|
||||
access_log off;
|
||||
expires 7d;
|
||||
add_header Cache-Control public;
|
||||
|
|
|
|||
Reference in a new issue