|
|
|
@ -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){ |
|
|
|
|