#nginx.conf http { ........................................................................................ geoip_country /home/server/apps/geoip/GeoIP.dat; geoip_city /home/server/apps/geoip/GeoIPCity.dat; ........................................................................................ }
server { listen 80; server_name radio.mysite.com; location / { proxy_buffering off; proxy_set_header X-Host $http_host; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header User-agent $geoip_city_country_code,$geoip_city_country_name,$geoip_city,$geoip_latitude,$geoip_longitude,$http_user_agent; chunked_transfer_encoding off; proxy_pass ********** } # location /radio_status { # stub_status on; # access_log off; # } }
http_stub_status_module --with-http_flv_module --with-http_ssl_module --with-http_dav_module --with-http_sub_module --with-http_realip_module --with-http_gzip_static_module --with-http_secure_link_module --with-ipv6 --with-http_geoip_module --with-debug
echo "deb ********** lenny main" >> /etc/apt/sources.list
echo "deb ********** squeeze main" >> /etc/apt/sources.list
# gpg --keyserver keys.gnupg.net --recv-keys 0A3D4789 ..... gpg: requesting key 0A3D4789 from hkp server keys.gnupg.net gpg: key 0A3D4789: public key "Debian.org.ua Custom Repository " imported gpg: Total number processed: 1 gpg: imported: 1 .... # gpg --armor --export 0A3D4789 | apt-key add - OK # apt-get update
wget -q ********** -O- | apt-key add -
#apt-get install nginx
proxy_set_header X-Host $http_host; proxy_set_header X-Forwarded-For $remote_addr;
server { listen 80; server_name radio.mysite.com; location / { proxy_buffering off; proxy_set_header X-Host $http_host; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header User-agent $geoip_city_country_code,$geoip_city_country_name,$geoip_city,$geoip_latitude,$geoip_longitude,$http_user_agent; chunked_transfer_encoding off; proxy_pass ********** access_log /server/log/nginx-icecast2.access.log; # <------------------------------------------------------------------------------------------------------------------ error_log /server/log/nginx-icecast2.error.log; # <--------------------------------------------------------------------------------------------------------------------- } }
<x-forwarded-for>127.0.0.1</x-forwarded-for>
chunked_transfer_encoding off;