Welcome! Log In Create A New Profile

Advanced

nginx video streaming - wrong mime type?

Posted by suntzu2011 
nginx video streaming - wrong mime type?
August 06, 2011 02:57PM
Hi,

I hope you can help.

We are trying to get video streaming working with Nginx being served by Erlyvideo.

*Problem*

On the end user location when the test page opens we see the content type flowing through as application/octet-stream even after the correct mime type has been added. We need it to pass video/mp4 properly through the http stream.

Any thoughts or advice would be appreciated.


/s


Server Information
=============

nginx version: nginx/0.8.54

nginx version: nginx/0.8.54
built by gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
TLS SNI support enabled
configure arguments: --prefix=/opt/wuchubuzai/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --with-http_gzip_static_module --http-client-body-temp-path=/var/lib/nginx/body --with-http_ssl_module --http-proxy-temp-path=/var/lib/nginx/proxy --with-http_stub_status_module --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug --with-http_flv_module --user=www-data --group=www-data --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_stub_status_module --with-rtsig_module --with-http_perl_module --with-http_geoip_module


============
nginx.conf
-----------------------

pid /var/run/nginx.pid;
user www-data;
worker_processes 2;
error_log /var/log/nginx/error.log;

events {
worker_connections 2048;
}

http {
include /etc/nginx/mime.types;
access_log /var/log/nginx/access.log;

## Size Limits
client_body_buffer_size 8k;
client_header_buffer_size 1k;
#client_max_body_size 1k;

client_max_body_size 2M;
large_client_header_buffers 1 1k;

## Timeouts
client_body_timeout 5;
client_header_timeout 5;
keepalive_timeout 2;
send_timeout 5;

## Compression
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 3;
gzip_http_version 1.1;
gzip_min_length 1000;
gzip_types text/plain text/css text/javascript image/x-icon image/bmp application/x-javascript application/xml;
gzip_vary on;
gzip_disable msie6;

proxy_set_header Accept-Encoding "";
gzip_proxied expired no-cache no-store private auth no_etag any;

## General options
ignore_invalid_headers on;
limit_zone gulag $binary_remote_addr 1m;
recursive_error_pages on;
sendfile on;
server_name_in_redirect off;
server_tokens off;

## TCP options
tcp_nodelay on;
tcp_nopush off;

## Proxy options
proxy_buffering on;
proxy_redirect off;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-FE-HostName $server_name;
proxy_set_header X-Country-Code $geoip_country_code;
proxy_set_header X-Country-Name $geoip_country_name;
proxy_set_header X-City-Code $geoip_city;
proxy_set_header X-Latitude $geoip_latitude;
proxy_set_header X-Longitude $geoip_longitude;
proxy_set_header X-Continent-Code $geoip_city_continent_code;
proxy_connect_timeout 60;
proxy_send_timeout 60;
proxy_read_timeout 60;

## Includes
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

### SET the path to the .dat file used for determining the visitor's country from the IP-address ###
geoip_country /usr/local/share/GeoIP/GeoIP.dat;
geoip_city /usr/local/share/GeoIP/GeoLiteCity.dat;

}

=================
mime.types
---------------------------------

types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/x-javascript js;
application/atom+xml atom;
application/rss+xml rss;

text/mathml mml;
text/plain txt;
text/vnd.sun.j2me.app-descriptor jad;
text/vnd.wap.wml wml;
text/x-component htc;

image/png png;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;
image/svg+xml svg;

application/java-archive jar war ear;
application/mac-binhex40 hqx;
application/msword doc;
application/pdf pdf;
application/postscript ps eps ai;
application/rtf rtf;
application/vnd.ms-excel xls;
application/vnd.ms-powerpoint ppt;
application/vnd.wap.wmlc wmlc;
application/vnd.wap.xhtml+xml xhtml;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/x-7z-compressed 7z;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeself run;
application/x-perl pl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-cert der pem crt;
application/x-xpinstall xpi;
application/zip zip;

application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream eot;
application/octet-stream iso img;
application/octet-stream msi msp msm;

audio/midi mid midi kar;
audio/mpeg mp3 m4a;
audio/x-realaudio ra;
audio/ogg oga;

video/3gpp 3gpp 3gp;
video/mpeg mpeg mpg;
video/quicktime mov;
video/x-flv flv;
video/x-mng mng;
video/x-ms-asf asx asf;
video/x-ms-wmv wmv;
video/x-msvideo avi;

application/ogg ogg ogx;

video/ogg ogv;
video/mp4 mp4 m4v;
video/webm webm;
}

================
vhost config
------------------------------

server {
listen 80;
server_name geo.domain.com;
access_log /var/www/vhosts/geo.domain.com/logs/access.log;
error_log /var/www/vhosts/geo.domain.com/logs/error.log;

## Default location
# location / {
# root /var/www/vhosts/geo.domain.com/htdocs;
# index index.php index.html index.htm;
# }

location / {
proxy_read_timeout 75;
proxy_send_timeout 75;
proxy_buffering off;
proxy_pass http://10.130.145.176:8082;
}

# location /open {
# proxy_read_timeout 75;
# proxy_send_timeout 75;
# proxy_buffering off;
# proxy_pass http://10.130.145.176:8082;
# }

# location /fcs {
# proxy_read_timeout 75;
# proxy_send_timeout 75;
# proxy_buffering off;
# proxy_pass http://10.130.145.176:8082;
# }

# location /close {
# proxy_read_timeout 75;
# proxy_send_timeout 75;
# proxy_buffering off;
# proxy_pass http://10.130.145.176:8082;
# }

location ~ \.php$ {
fastcgi_pass unix:/opt/domain/php5/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/vhosts/geo.domain.com/htdocs$fastcgi_script_name;
include fastcgi_params;
}

}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 206
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready