≡ Menu

Nginx Tutorials and HowTos

Nginx is a free, open-source, high-performance HTTP server and reverse proxy software. This section includes tutorials about Nginx configuration, security, optimization, and tips under Unix like operating systems ( rss feed ).

Nginx: 413 Request Entity Too Large Error and Solution

I'm running nginx as a frond end to php based Apache+mod_fastcgi server. My app lets user upload images upto 2MB in size. When users trying to upload 1.5MB+ size image file using nginx reverse proxy, they are getting the following error on screen:

Nginx 413 Request Entity Too Large

How do I fix this problem and allow image upload upto 2MB in size using nginx web-server working in reverse proxy or stand-alone mode on Unix like operating systems?
[click to continue…]

HowTo: Merge Apache / Lighttpd / Nginx Server Log Files

My ecommerce site runs using a cluster of Apache web server. The cluster is behind nginx load balancer. I want to merge backend Apache web server log files for statistics purpose. How do I mere web server log files under Linux / UNIX like operating systems using cron jobs?
[click to continue…]

HowTo: Find Out Nginx Web Server Version

How do I print Nginx web server version using command line option under Unix like operating systems?
[click to continue…]

Ubuntu Linux: Start / Restart / Stop Nginx Web Server

How do I restart / stop / start the nginx web server under a Ubuntu Linux operating systems using command line option?
[click to continue…]

Mediawiki Fix Internal Server Host Names / Redirection In shared Hosting or Proxy Setup

Our customer support wiki runs on an internal host (ip:, hostname a-node100.:300) and it is behind the nginx reverse proxy server. However, our Apache server end up displaying internal server name http://a-node100.:300/, which results into an unexpected redirection and timeouts as http://a-node100.:300/ is not accessible over the Internet. How do I force nginx or apache to use the base URL of our server (http://support.example.com/wiki/)?

[click to continue…]

nginx: Create HTTP 503 Maintenance Custom Page

I know how to create a custom http 503 maintenance page under Lighttpd or Apache web server. How do I create a custom Nginx web server maintenance page?
[click to continue…]

WordPress Rename Image URL For a CDN Usage

Recently, we moved all our static assets to a CDN (Content Delivery Network) as described here. However, we have over 8000+ old blog posts and we need to point static images url to our CDN account hosted at http://MyACCOUNT.cloudfront.net/images/ folder. How do I rename all image urls stored in wordpress posts? How do I offload static images to a CDN urls under WordPress?
[click to continue…]

NGINX: Create Custom 404 / 403 Error Page

How do I create a custom static HTTP 404 or HTTP 403 error page under nginx web server?
[click to continue…]

nginx: Install GeoIP Module For Country / City Level Geo Targeting

How do I install GeoIP nginx module for country and/or city level geo targeting?
[click to continue…]

Nginx: Configure and Install With IPv6 Networking Support

How do I configure IPv6 networking under nginx? How do I assign and use an IPv6 address under nginx web server? How do I enable IPv6 Support in nginx?
[click to continue…]