Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository 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
mediaserver
envsetup
Commits
bba2f435
Commit
bba2f435
authored
6 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Changed CM Nginx proxy conf for MC (refs
#25820
).
parent
eeefea97
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
2.Common_services/5.Nginx/vhost_skyreach.conf
+23
-4
23 additions, 4 deletions
2.Common_services/5.Nginx/vhost_skyreach.conf
with
23 additions
and
4 deletions
2.Common_services/5.Nginx/vhost_skyreach.conf
+
23
−
4
View file @
bba2f435
map
$
http_upgrade
$
connection_upgrade
{
default
upgrade
;
''
close
;
}
server
{
listen
80
;
server_name
{{
server_name
}};
...
...
@@ -45,11 +50,12 @@ server {
proxy_read_timeout
12
h
;
}
location
/
streaming
/ {
#
check requested path, only m3u8 and ts are allowed
location
/
proxy
/ {
#
proxy for MediaCoder UI and files
# ?: means that the group should not be stored as variable
location
~ ^/
streaming
/([\
d
\.\:]+)/((?:.+)\.(?:
m3u8
|
ts
)(?:\?.+)*)$ {
proxy_pass
https
://$
1
/$
2
;
# proxy for m3u8 and ts files with cache
location
~ ^/
proxy
/([\
d
\.\:]+)/(.+\.(?:
m3u8
|
ts
))$ {
proxy_cache
livecache
;
# do not consider secure urls as new files
proxy_cache_key
$
scheme
$
proxy_host
$
uri
;
...
...
@@ -58,6 +64,19 @@ server {
# show if playlist or fragment has been cached from wowza
add_header
X
-
Cache
$
upstream_cache_status
;
# wowza is defining expiration headers (m3u8 is 1s, ts is 3600)
proxy_pass
https
://$
1
/$
2
;
}
# proxy for other urls including websocket
location
~ ^/
proxy
/([\
d
\.\:]+)/(.*)$ {
proxy_http_version
1
.
1
;
proxy_buffering
off
;
# needed for websocket
proxy_set_header
Upgrade
$
http_upgrade
;
proxy_set_header
Connection
$
connection_upgrade
;
# change scheme of "Origin" to https
proxy_set_header
Origin
https
://$
1
;
proxy_pass
https
://$
1
/$
2
;
}
}
...
...
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