Nginx config documentation improvement for generic rewrite rules

remotes/angel/1.11.x
Yannick Warnier 8 years ago
parent 2fa38b0b28
commit e9f582a099
  1. 3
      documentation/installation_guide.html
  2. 4
      documentation/installation_guide_es_ES.html
  3. 4
      documentation/installation_guide_fr_FR.html

@ -701,10 +701,13 @@ If you have issues with files taking a long time to download, make sure you reco
location @rewrite{
rewrite ^/courses/([^/]+)/scorm/(.*)$ /main/document/download_scorm.php?doc_url=/$2&cDir=$1 last;
# Alternatively, you can choose to give direct access to all SCORM files, which is much faster but less secure
# rewrite "^/courses/([^/]+)/scorm/(.*)$" /app/courses/$1/scorm/$2 break;
rewrite "^/courses/([^/]+)/document/certificates/(.*)$" /app/courses/$1/document/certificates/$2 last;
rewrite ^/courses/([^/]+)/document/(.*)$ /main/document/download.php?doc_url=/$2&cDir=$1 last;
rewrite ^/courses/([^/]+)/work/(.*)$ /main/work/download.php?file=work/$2&cDir=$1 last;
rewrite ^/courses/([^/]+)/upload/(.*)$ /app/courses/$1/upload/$2 last;
rewrite ^/main/upload/users/(.*)/(.*)/my_files/(.*)$ /app/upload/users/$1/$2/my_files/$3 last;
try_files $uri /index.php;
break;
}

@ -686,9 +686,13 @@ por ejemplo. El efecto debería ser inmediato.
location @rewrite{
rewrite ^/courses/([^/]+)/scorm/(.*)$ /main/document/download_scorm.php?doc_url=/$2&cDir=$1 last;
# Alternatively, you can choose to give direct access to all SCORM files, which is much faster but less secure
# rewrite "^/courses/([^/]+)/scorm/(.*)$" /app/courses/$1/scorm/$2 break;
rewrite "^/courses/([^/]+)/document/certificates/(.*)$" /app/courses/$1/document/certificates/$2 last;
rewrite ^/courses/([^/]+)/document/(.*)$ /main/document/download.php?doc_url=/$2&cDir=$1 last;
rewrite ^/courses/([^/]+)/work/(.*)$ /main/work/download.php?file=work/$2&cDir=$1 last;
rewrite ^/courses/([^/]+)/upload/(.*)$ /app/courses/$1/upload/$2 last;
rewrite ^/main/upload/users/(.*)/(.*)/my_files/(.*)$ /app/upload/users/$1/$2/my_files/$3 last;
try_files $uri /index.php;
break;
}

@ -755,9 +755,13 @@ Ce sont uniquement les redirections à placer dans un bloc server{}, comme les a
location @rewrite{
rewrite ^/courses/([^/]+)/scorm/(.*)$ /main/document/download_scorm.php?doc_url=/$2&cDir=$1 last;
# Alternatively, you can choose to give direct access to all SCORM files, which is much faster but less secure
# rewrite "^/courses/([^/]+)/scorm/(.*)$" /app/courses/$1/scorm/$2 break;
rewrite "^/courses/([^/]+)/document/certificates/(.*)$" /app/courses/$1/document/certificates/$2 last;
rewrite ^/courses/([^/]+)/document/(.*)$ /main/document/download.php?doc_url=/$2&cDir=$1 last;
rewrite ^/courses/([^/]+)/work/(.*)$ /main/work/download.php?file=work/$2&cDir=$1 last;
rewrite ^/courses/([^/]+)/upload/(.*)$ /app/courses/$1/upload/$2 last;
rewrite ^/main/upload/users/(.*)/(.*)/my_files/(.*)$ /app/upload/users/$1/$2/my_files/$3 last;
try_files $uri /index.php;
break;
}

Loading…
Cancel
Save