Nginx config documentation improvement for static media content

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

@ -741,7 +741,7 @@ If you have issues with files taking a long time to download, make sure you reco
}
# Serve static files directly
location ~* \.(png|jpe?g|gif|ico|js)$ {
location ~* \.(png|jpe?g|gif|ico|js|css|mp3|swf|flv|mp4|ogg)$ {
expires 1y;
access_log off;
rewrite ^/courses/([^/]+)/course-pic85x85.png$ /app/courses/$1/course-pic85x85.png last;
@ -750,6 +750,8 @@ If you have issues with files taking a long time to download, make sure you reco
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;
# For all these media resources not treated by previous rewrites, give direct access (no permission check)
rewrite ^/courses/(.*)$ /app/courses/$1 break;
try_files $uri @rewrite;
}
location ~ ~\.(ht|git){

@ -723,7 +723,7 @@ por ejemplo. El efecto debería ser inmediato.
}
# Serve static files directly
location ~* \.(png|jpe?g|gif|ico)$ {
location ~* \.(png|jpe?g|gif|ico|js|css|mp3|swf|flv|mp4|ogg)$ {
expires 1y;
access_log off;
rewrite ^/courses/([^/]+)/course-pic85x85.png$ /app/courses/$1/course-pic85x85.png last;
@ -732,6 +732,8 @@ por ejemplo. El efecto debería ser inmediato.
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;
# For all these media resources not treated by previous rewrites, give direct access (no permission check)
rewrite ^/courses/(.*)$ /app/courses/$1 break;
try_files $uri @rewrite;
}
location ~ ~\.(ht|git){

@ -792,7 +792,7 @@ Ce sont uniquement les redirections à placer dans un bloc server{}, comme les a
}
# Serve static files directly
location ~* \.(png|jpe?g|gif|ico)$ {
location ~* \.(png|jpe?g|gif|ico|js|css|mp3|swf|flv|mp4|ogg)$ {
expires 1y;
access_log off;
rewrite ^/courses/([^/]+)/course-pic85x85.png$ /app/courses/$1/course-pic85x85.png last;
@ -801,6 +801,8 @@ Ce sont uniquement les redirections à placer dans un bloc server{}, comme les a
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;
# For all these media resources not treated by previous rewrites, give direct access (no permission check)
rewrite ^/courses/(.*)$ /app/courses/$1 break;
try_files $uri @rewrite;
}
location ~ ~\.(ht|git){

Loading…
Cancel
Save