Mastering Nginx

(Ron) #1

The NGINX HTTP Server


[ 150 ]

# Pseudo-streaming of FLV files
location ^~ /sites/default/files/video/flv {

location ~* ^/sites/default/files/video/flv/.*\.flv$ {

flv;

}

}

The next two pseudo-streaming sections are also similar. The pseudo-streaming for


H264 file is specified in the following code:


# Pseudo-streaming of H264 files.
location ^~ /sites/default/files/video/mp4 {

location ~* ^/sites/default/files/video/mp4/.*\.
(?:mp4|mov)$ {

And pseudo-streaming for AAC files is specified in the following code:


# Pseudo-streaming of AAC files.
location ^~ /sites/default/files/video/m4a {

location ~* ^/sites/default/files/video/m4a/.*\.m4a$ {

These have the following common between them:


mp4;

mp4_buffer_size 1M;

mp4_max_buffer_size 5M;

}

}

# Advanced Help module makes each module-provided
# README available.
location ^~ /help/ {

location ~* ^/help/[^/]*/README\.txt$ {
Free download pdf