I would generally agree with these statements, especially that the webserver&#39;s (nginx, apache) job is to serve content (resources) and that is its job.&nbsp; Even in apache, I am pretty sure there is not some magical compiler setting for web application security.&nbsp; <br>
<br>What there generally is (in apache) is the use of a &quot;web application firewall&quot; like mod_security.&nbsp; Currently, there is not such a module in NginX, but you could write one, as it is essentially a filter.&nbsp; If you are using Python with WSGI there is WSGI middleware that can act in the same capacity.&nbsp; Even with such a thing in place, you should STILL be doing validation application side or you leave yourself open to when people get around your web application firewall or it is down (perhaps because you disabled it)!<br>
<br>Let&#39;s let the webserver serve and the applications, er, apply.<br><br>
<div class="gmail_quote">On Fri, Feb 20, 2009 at 2:15 PM, Nuno Magalhães <span dir="ltr">&lt;<a href="mailto:nunomagalhaes@eu.ipp.pt" target="_blank">nunomagalhaes@eu.ipp.pt</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div>On Fri, Feb 20, 2009 at 9:01 PM, Paul Greenwood &lt;<a href="mailto:attaboy.p@gmail.com" target="_blank">attaboy.p@gmail.com</a>&gt; wrote:<br>
&gt; Is there some specific parameters that are used to lock down nginx for<br>
&gt; example that might prevent sql injection or css attacks.<br>
<br>
</div>From what i&#39;ve seen, SQL injection, XSS-attacks and alike are all done<br>
by exploiting client-side scripting (Javascript etc) or data entered<br>
by users (into form fields). Avoiding client-side scripting could<br>
mitigate this; as would validating all user input (this one&#39;s basic);<br>
and escaping all code that is not part of the markup (ampersand<br>
entities, %-codes for URLs, that sort of stuff - think bb-code). I<br>
think none of this is directly related to the webserver and a big part<br>
of the risk lies with users not knowing how yo use their browsers.<br>
<font color="#888888"><br>
Nuno<br>
<br>
</font></blockquote></div><br>