<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>nixCraft Linux / UNIX / Shell Scripting Forum - Web servers</title>
		<link>http://nixcraft.com/</link>
		<description>Discussion on Apache, Nginx and Lighttpd HTTP/web server and configuration issues.</description>
		<language>en</language>
		<lastBuildDate>Sat, 25 May 2013 16:54:07 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://nixcraft.com/images/misc/rss.png</url>
			<title>nixCraft Linux / UNIX / Shell Scripting Forum - Web servers</title>
			<link>http://nixcraft.com/</link>
		</image>
		<item>
			<title>Nginx server load goes up and unable to keep videos starting/seeking reliably</title>
			<link>http://nixcraft.com/web-servers/19713-nginx-server-load-goes-up-unable-keep-videos-starting-seeking-reliably.html</link>
			<pubDate>Sun, 19 May 2013 01:18:48 GMT</pubDate>
			<description>Hello, 
 
A friend of mine has a medium-sized video storage site which gets over  650K daily streams, but he is struggling to keep videos...</description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div><!-- google_ad_section_start -->Hello,<br />
<br />
A friend of mine has a medium-sized video storage site which gets over  650K daily streams, but he is struggling to keep videos starting/seeking reliably. The site primarily serves large (200MB+) videos and each video typically will have many simultaneous streams - sometimes 500+. <br />
 sometimes it can take 30 seconds or longer to start a video. I've tweaked as much as I can on the kernel and nginx, I just wanted to share the configuration here to see if there is anything further I can do to improve the site.<br />
<br />
services are on dedicated servers, 1gbps unlimited<br />
quad core: E3-1220 V2 @ 3.10GHz<br />
SATA disks with software raid 1<br />
16GB RAM<br />
<br />
nginx config<br />
<br />
<!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">worker_processes&nbsp; 2;<br />
<br />
worker_rlimit_nofile 60240;<br />
worker_rlimit_sigpending 32768;<br />
error_log&nbsp; logs/error.log&nbsp; info;<br />
<br />
events {<br />
&nbsp; &nbsp; worker_connections&nbsp; 4096;<br />
}<br />
&nbsp; &nbsp; tcp_nopush&nbsp; &nbsp;  on;<br />
<br />
&nbsp; &nbsp; client_body_buffer_size 1K;<br />
&nbsp; &nbsp; client_header_buffer_size 1k;<br />
&nbsp; &nbsp; client_max_body_size 1k;<br />
&nbsp; &nbsp; large_client_header_buffers 2 1k;<br />
&nbsp; &nbsp; client_body_timeout&nbsp;  10;<br />
&nbsp; &nbsp; client_header_timeout 10;<br />
&nbsp; &nbsp; keepalive_timeout&nbsp; &nbsp;  5 5;<br />
&nbsp; &nbsp; send_timeout&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10;<br />
<br />
&nbsp; &nbsp; gzip&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  on;<br />
&nbsp; &nbsp; gzip_comp_level&nbsp; 2;<br />
&nbsp; &nbsp; gzip_min_length&nbsp; 1000;<br />
&nbsp; &nbsp; gzip_proxied&nbsp; &nbsp;  expired no-cache no-store private auth;<br />
&nbsp; &nbsp; gzip_types&nbsp; &nbsp; &nbsp;  text/plain application/xml;<br />
&nbsp; &nbsp; gzip_disable&nbsp; &nbsp;  &quot;MSIE [1-6]\.&quot;;<br />
&nbsp; &nbsp; limit_conn_zone $binary_remote_addr zone=addr:10m;<br />
&nbsp; &nbsp; perl_modules&nbsp; perl;<br />
&nbsp; &nbsp; perl_require&nbsp; xvs_download.pm;<br />
&nbsp; &nbsp; include sites/*.conf;</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable --><br />
in the sites/ there is an additional config <br />
<br />
<!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&nbsp; &nbsp; server {<br />
&nbsp; &nbsp; &nbsp; &nbsp; listen&nbsp; &nbsp; &nbsp;  8777;<br />
&nbsp; &nbsp; &nbsp; &nbsp; server_name&nbsp; fs1.local.local;<br />
&nbsp; &nbsp; &nbsp; &nbsp; proxy_set_header X-Real-IP $remote_addr;<br />
&nbsp; &nbsp; &nbsp; &nbsp; keepalive_timeout&nbsp; &nbsp;  5 5;<br />
&nbsp; &nbsp; &nbsp; &nbsp; location / {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  root&nbsp; &nbsp; &nbsp; &nbsp;  /var/www/htdocs;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  access_log&nbsp;  off;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; location ~* &quot;^/(\w{48,})/&quot; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; perl&nbsp; xvs_download::handler;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; # MP4 video<br />
&nbsp; &nbsp; &nbsp; &nbsp; location /download/ {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; internal;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alias /var/www/cgi-bin/uploads/;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; limit_conn addr 2;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; limit_rate_after 1m;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; limit_rate 180k;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  output_buffers 1 1m;<br />
}</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable --><br />
Any assistance would be much appreciated.<!-- google_ad_section_end --></div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="http://nixcraft.com/web-servers/">Web servers</category>
			<dc:creator>ananth_ak</dc:creator>
			<guid isPermaLink="true">http://nixcraft.com/web-servers/19713-nginx-server-load-goes-up-unable-keep-videos-starting-seeking-reliably.html</guid>
		</item>
		<item>
			<title>Apache host header help</title>
			<link>http://nixcraft.com/web-servers/19685-apache-host-header-help.html</link>
			<pubDate>Fri, 10 May 2013 10:01:59 GMT</pubDate>
			<description><![CDATA[Hi , I have Apache 2 running on Ubuntu server, On my site I have multiple web-servers running on windows server . What I'm looking to do is have the...]]></description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div><!-- google_ad_section_start -->Hi , I have Apache 2 running on Ubuntu server, On my site I have multiple web-servers running on windows server . What I'm looking to do is have the Apache box forward the other requested website to the appropriate web-server on site . From reading some other posts in forums its suggests that this can be done by editing the apache2.conf file ? could someone explain step by step how to achieve this please .<br />
<br />
Thanks in advance for any help <br />
<br />
Dan<!-- google_ad_section_end --></div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="http://nixcraft.com/web-servers/">Web servers</category>
			<dc:creator>dan1975uk</dc:creator>
			<guid isPermaLink="true">http://nixcraft.com/web-servers/19685-apache-host-header-help.html</guid>
		</item>
		<item>
			<title>Misssing file mod_cgi.so in my Lighttpd setup</title>
			<link>http://nixcraft.com/web-servers/19682-misssing-file-mod_cgi-so-my-lighttpd-setup.html</link>
			<pubDate>Thu, 09 May 2013 19:29:09 GMT</pubDate>
			<description>Can anyone tell mer where I can get this file at for a Linux setup please?</description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div><!-- google_ad_section_start -->Can anyone tell mer where I can get this file at for a Linux setup please?<!-- google_ad_section_end --></div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="http://nixcraft.com/web-servers/">Web servers</category>
			<dc:creator>erdc</dc:creator>
			<guid isPermaLink="true">http://nixcraft.com/web-servers/19682-misssing-file-mod_cgi-so-my-lighttpd-setup.html</guid>
		</item>
		<item>
			<title><![CDATA[[Solved] Raspberry Pi Lighttpd: Run program via web]]></title>
			<link>http://nixcraft.com/web-servers/19665-raspberry-pi-lighttpd-run-program-via-web.html</link>
			<pubDate>Tue, 30 Apr 2013 22:39:58 GMT</pubDate>
			<description><![CDATA[Ok, so I've got a Raspberry Pi and a simple c program that turns a stepper motor. 
On the stepper motor I have mounted a webcam. 
All is working, I...]]></description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div><!-- google_ad_section_start -->Ok, so I've got a Raspberry Pi and a simple c program that turns a stepper motor.<br />
On the stepper motor I have mounted a webcam.<br />
All is working, I can run the program, e.g. sudo ./step -10, to turn the cam 10 steps to the left.<br />
<br />
What I want now is to run this via a web page.<br />
So I made a simple script, left10 and put it together with the program (step) in /var/www/cgi-bin:<br />
<!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">#!/bin/sh<br />
<br />
echo &quot;test&quot;<br />
foo = `sudo /var/www/cgi-bin/step --v -10`<br />
echo $foo</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->(--v gives a bit of output, otherwise it's silent)<br />
I get this script running by using URL/cgi-bin/left10, but it only outputs &quot;test&quot;, and the motor is not turned.<br />
I have tried various variations, i.e. running directly (not passing the output to $foo), using a relative path etc, but the program (step) is not run.<br />
I have also tried perl, but I'm more comfortable with sh/bash.<br />
(Security etc is not an issue here/now.)<br />
Web server is lighttpd if it matters.<br />
<br />
Any pointers?<br />
<br />
/Mats<!-- google_ad_section_end --></div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="http://nixcraft.com/web-servers/">Web servers</category>
			<dc:creator>mohsart</dc:creator>
			<guid isPermaLink="true">http://nixcraft.com/web-servers/19665-raspberry-pi-lighttpd-run-program-via-web.html</guid>
		</item>
	</channel>
</rss>
