Nginx Tutorial

Nginx, pronounced "engine X", is a fast and lightweight web server, that can be used to serve static files, but is often used as a reverse proxy. It has some very nice features like load balancing and rate limiting. We'll cover some common use cases like serving files, creating a directory listing, reverse proxying to pass incoming traffic to a local web server, adding SSL encryption, and how to require https and www on your site. This guide is for someone who needs a quick reference to setting up a simple nginx server. For the latest documentation always check out the official website and the source mirror at

One-line HTTP servers

If you need a quick-and-dirty HTTP server that doesn't need fancy configuration, try some of these one-line HTTP servers in languages like Python, Ruby, and PHP. Some examples include a small script that allows you to embed the server in to your program and add more customization. These are not intended for production use.

Using libpcap in C

libpcap allows us to capture or send packets from a live network device or a file. This tutorial and code examples will walk you through using libpcap to find network devices, get information about devices, process packets in real time or offline, send packets, and even listen to wireless traffic.

How to Use SSL Sockets with PHP

SSL sockets are perfect for sending secure data. With certificates, you can verify the identify of the host, the client, or both. Signed certificates cost money but you can create and self-sign a certificate. Check out the code samples below to see how to generate SSL certificates and create SSL clients and servers. Examples include raw socket communication as well as the common HTTPS protocol.

Unit Testing TCP Server & Client with Python

Unit testing a TCP server and client can be tricky at first. Let me share what I've come up with for unit testing them. I will not provide full test class code just invidual test methods. If you don't know how to use unittest with Python and get your tests running refer to the unittest documentation. GameServer.Server and GameClient.Client are the classes that are being tested and which should be implemented elsewhere.