Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

serve mp3 files as regular http

$
0
0
I have an issue with media files that can be played on an embedded Flowplayer player served by a rails application, where the file can be played, but pause button doesn't work subsequently and the playback can't be stopped; this is using puma and nginx, and can, as of this writing, be seen here: http://avondale.adventistconnect.org/podcasts/735/media_entries/3940 . In the Flowplayer forum, I was advised that "your server is sending the audio clip as a binary inline file stream, which Flash probably doesn't like; serve the mp3 as a standard http file and see if that helps". So, I tried googling and haven't found really anything about how I can do that. Here is a copy of headers from the above page:

HTTP/1.1 200 OK
Server: nginx/1.8.0
Date: Wed, 03 Jun 2015 04:39:28 GMT
Content-Type: audio/mpeg
Transfer-Encoding: chunked
Connection: keep-alive
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-UA-Compatible: chrome=1
Content-Disposition: inline; filename="Alumni_Lecture.mp3"
Content-Transfer-Encoding: binary
Cache-Control: private


and, here is an nginx -V output:

nginx version: nginx/1.8.0
built with OpenSSL 1.0.1f 6 Jan 2014
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_mp4_module --with-http_perl_module --with-http_random_index_module --with-http_secure_link_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module --add-module=/build/buildd/nginx-1.8.0/debian/modules/headers-more-nginx-module --add-module=/build/buildd/nginx-1.8.0/debian/modules/nginx-auth-pam --add-module=/build/buildd/nginx-1.8.0/debian/modules/nginx-cache-purge --add-module=/build/buildd/nginx-1.8.0/debian/modules/nginx-dav-ext-module --add-module=/build/buildd/nginx-1.8.0/debian/modules/nginx-development-kit --add-module=/build/buildd/nginx-1.8.0/debian/modules/nginx-echo --add-module=/build/buildd/nginx-1.8.0/debian/modules/ngx-fancyindex --add-module=/build/buildd/nginx-1.8.0/debian/modules/nginx-http-push --add-module=/build/buildd/nginx-1.8.0/debian/modules/nginx-lua --add-module=/build/buildd/nginx-1.8.0/debian/modules/nginx-upload-progress --add-module=/build/buildd/nginx-1.8.0/debian/modules/nginx-upstream-fair --add-module=/build/buildd/nginx-1.8.0/debian/modules/ngx_http_substitutions_filter_module


here is what I think the relevant config section is:

location / {
try_files /maintenance.html $uri $uri/index.html $uri.html @ruby;
}

location @ruby {
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_pass http://na4;
proxy_set_header Host $host;
proxy_set_header X-FORWARDED_PROTO $scheme;
}

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>