<metaname="description" content="Full Stack Python explains each layer of the web application stack, from the server up through the rendering in a user's browser.">
and commonly a content response. Some status codes, such as 204 (No content)
and 403 (Forbidden), do not have content responses.</p>
<p>In a simple case, the client will request a static asset such as a picture
or JavaScript file. The file sits on the file system in a location the
web server is authorized to access and the web server sends the file
to the client with a 200 status code. If the client already requested the
file and the file has not changed, the web server will pass back a 304
"Not modified" response indicating the client already has the latest version
of that file.</p>
<p><imgsrc="theme/img/web-browser-server-requests.png" width="100%" class="technical-diagram" alt="Web server and web browser request-response cycle" /></p>
<p>A web server sends files to a web browser based on the web browser's
request. In the first request, the browser accessed the
"www.fullstackpython.com"
address and the server responded with the index.html HTML-formatted file.
That HTML file contained references to other files, such as style.css and
script.js that the browser then requested from the server.</p>
<p>Sending static assets (such as CSS and JavaScript files) can eat up a
large amount of bandwidth which is why using a Content Delivery Network
(CDN) is important when possible (see the content delivery network
<p><ahref="http://arstechnica.com/business/2011/11/a-faster-web-server-ripping-out-apache-for-nginx/">A faster Web server: ripping out Apache for Nginx</a></p>
</li>
<li>
<p><ahref="http://ibuildings.nl/blog/2013/03/4-http-security-headers-you-should-always-be-using">4 HTTP Security Headers You Should Always Be Using</a></p>
</li>
</ul>
<h2>Web servers learning checklist</h2>
<p><iclass="fa fa-check-square-o"></i>
Choose a web server. <ahref="http://nginx.org/en/">Nginx</a> is recommended although
<ahref="http://httpd.apache.org/">Apache</a> is also a great choice.</p>
<p><iclass="fa fa-check-square-o"></i>
Create an SSL certificate. For testing use a self-signed certificate and for a
production app buy one from <ahref="http://www.digicert.com/">Digicert</a>. Configure
the web server to serve traffic over SSL. You'll need SSL for serving only
HTTPS traffic and preventing security issues that occur with unencrypted user
input.</p>
<p><iclass="fa fa-check-square-o"></i>
Configure the web server to serve up static files such as CSS, JavaScript
and images.</p>
<p><iclass="fa fa-check-square-o"></i>
Once you set up the <ahref="/wsgi-servers.html">WSGI server</a> you'll need to configure
the web server as a pass through for dynamic content.</p>
<h3>What do you want to learn after the web server is set up?</h3>
<h4>Interested in a complete Full Stack Python book with detailed tutorials and example code? Sign up here and you'll get an alert email if a book is created. No other emails will be sent other than sign up confirmation.</h4>
$("#mc-embedded-subscribe-form").unbind('submit');//remove the validator so we can get into beforeSubmit on the ajaxform, which then calls the validator