Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible-public
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
system
ansible-public
Commits
0108150f
Commit
0108150f
authored
1 year ago
by
Antoine SCHILDKNECHT
Browse files
Options
Downloads
Plain Diff
Remove mediacache templates folder | refs
#37557
parents
34df501a
ca6a747e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
roles/mediacache/templates/index.j2
+0
-17
0 additions, 17 deletions
roles/mediacache/templates/index.j2
roles/mediacache/templates/mediacache.j2
+0
-96
0 additions, 96 deletions
roles/mediacache/templates/mediacache.j2
with
0 additions
and
113 deletions
roles/mediacache/templates/index.j2
deleted
100644 → 0
+
0
−
17
View file @
34df501a
<!DOCTYPE html>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<title>
UbiCast cache server
</title>
<style>
html
{
background
:
#222
;
color
:
#ddd
;
}
body
{
margin
:
0
auto
;
max-width
:
500px
;
}
a
{
color
:
#5cf
;
text-decoration
:
none
;
}
a
:hover
{
text-decoration
:
underline
;
}
</style>
</head>
<body>
<h1>
UbiCast cache server
</h1>
<hr/>
<p>
Powered by UbiCast --
<a
href=
"https://www.ubicast.eu"
>
https://www.ubicast.eu
</a></p>
</body>
</html>
This diff is collapsed.
Click to expand it.
roles/mediacache/templates/mediacache.j2
deleted
100644 → 0
+
0
−
96
View file @
34df501a
# Cache configuration
# Maximum retention of 30 days
# 1G of RAM for keys zone (one megabyte can store about 8 thousand keys)
# wost case is up to 2800 hours of 720p video (50M files) on a 2 TB cache
# WARNING: keys_zone=name:size size does not accept g units, only m
# https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_path
proxy_cache_path {{ mediacache_folder }} levels=1:2 keys_zone=mediacache:1000m max_size={{ mediacache_size }}g inactive=30d;
server {
listen 80 default_server;
server_name {{ mc_url }};
location /.well-known/acme-challenge {
default_type "text/plain";
root /var/www/letsencrypt;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 default_server ssl backlog=15000;
server_name {{ mc_url }};
root /var/www/mediacache/;
location /crossdomain {
}
location /streaming/ {
# Live; expiration headers are defined by upstream (nginx/wowza)
rewrite ^/(.*)$ /$1? break;
proxy_pass https://{{ ms_url }};
proxy_cache mediacache;
# do not consider secure urls as new files
proxy_cache_key $scheme$proxy_host$uri;
# only one request at a time will be allowed to populate a new cache element
proxy_cache_lock on;
# hide upstream X-Cache header
proxy_hide_header X-Cache;
# add own X-Cache header
add_header X-Cache $upstream_cache_status;
# rm cookie
proxy_hide_header Set-Cookie;
proxy_ignore_headers Set-Cookie;
}
location /resources/ {
# VOD
location ~ \.(m3u8|ts|mp4|mp3|oga|ogv|ogg|mov|flv)$ {
rewrite ^/(.*)$ /$1? break;
proxy_pass https://{{ ms_url }};
proxy_cache mediacache;
# do not consider secure urls as new files
proxy_cache_key $scheme$proxy_host$uri;
# only one request at a time will be allowed to populate a new cache element
proxy_cache_lock on;
# how long should the data be kept in the cache
proxy_cache_valid 200 30d;
# instruct browser to cache this
expires 7d;
# headers
proxy_ignore_headers "Cache-Control" "X-Accel-Expires" "Expires";
add_header X-Cache $upstream_cache_status;
# rm cookie
proxy_hide_header Set-Cookie;
proxy_ignore_headers Set-Cookie;
}
}
location / {
# only urls to video and audio files are allowed, discard any requested path for other urls
rewrite ^/(.*)$ /index.html? break;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment