<div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">I took a bit of time to do that... TBH I lost a lot of time finding a way to record traffic to a locally hosted Web server in Windows... :o\<br>
Why would people host stuff with Windows? oO<br><br>Anyway. Here are the details:<br><br>Configuration:<br>nginx 1.5.6<br>PHP 5.4.20 Thread-Safe<br>Wireshark 1.10.2<br>I took the liberty of upgrading test components to the latest release in the same branch, since some bugs of interest might have been corrected.<br>
<br>Synthesis:<br>I didn't go far on the PHP side, but I noticed on early captures that PHP was still sending everything after 5 seconds.<br><br>I cheated a little bit by modifying the test file to use the PHP flush() procedure which forces buffers to be emptied and content sent to the client.<br>
<br>I then noticed on the capture that PHP was rightfully sending the content in 2 parts as expected but somehow nginx was still waiting for the last parto to arrive before sending content to the client.<br><br>There is still work to be done on the nginx side. Since we are on the nginx mailing list, you may prioritize and see to the PHP part later on. :o)<br>
<br>Every modification I made to the original nginx.conf file is self-contained in the location serving '.php' files.<br>How to reproduce:<br>The main concern here was to record traffic between nginx and PHP. Here are the steps for a successful operation.<br>
<br><ol><li>Use the nginx configuration provided as attachment (nginx.conf to put in <nginx dir>\conf\, overwriting the default one)</li><li>Place the test script in <nginx dir>\html\</li><li>Use the PHP configuration provided as attachement (php.ini to put in <PHP dir>)</li>
<li>Modify Windows' routing table to force local traffic to make a round trip to the nearest router/switch (local traffic can't be recorded on modern Windows) :</li><li>In cmd.exe, type 'route add <computer external IP address> <gateway IP address>' (you'll find required information with a quick 'ipconfig')</li>
<li>Start PHP with following arguments (either command-line or through a shortcut): 'php-cgi.exe -b <computer external IP address>:9000'</li><li>Start nginx (simply double click on it)</li><li>Check that 2 nginx processes and 1 php-cgi.exe process exist in the task manager.</li>
<li>Check (through 'netstat -abn') that php-cgi.exe is listening on <computer external IP address>:9000</li><li>Start Wireshark recording on the interface related to the IP address used before (or all interfaces) with capture filter 'port 9000'</li>
<li>Browse to <a href="http://localhost/test.php">http://localhost/test.php</a></li><li>Stop Wireshark recording</li></ol>You'll find my recording of the backend traffic as attachement.<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">
Please ignore the duplicated traffic (ad traffic going forth and back on the network interface is recorded 2 times total: that's a drawback to the 'hack' setup you need on Windows to record local traffic...).<br>
</div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)"><br>Hope that'll help<br><font size="1"><span style="color:rgb(102,102,102)"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">
</div>---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b></font><br></div></div>