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 ).

I have four Apache backend servers in front of nginx reverse proxy server. How do I make sure nginx reverse proxy load balancer always send specific client IP address (say IP 1.2.3.4) request to http://apachereadwrite/ backend and rest to http://apachereadonly/ backend?

{ 3 comments }

Apache has status page that can provide data about Apache. How do I enable and display such page using nginx server? How do I enable nginx status page on Linux or Unix-like operating systems?

{ 3 comments }

I am a small business and ecom site owner. I also run a WordPress based blog to connect with my customers. However, I get too much spam from certain IPs and net-blocks. How do I block access to certain url(s) such as example.com/blog/wp-comments-post.php for selected IP address and CIDRs? How do I allow everyone including IP address 1.2.3.4 to access my blog but block IP address 1.2.3.4 accessing only example.com/blog/wp-comments-post.php? How do I block POST requests for selected IPs/CIDR on nginx?

{ 1 comment }

I am a new Nginx web server user. How do I redirect to a different domain using nginx (say example.org to example.com) permanently?

{ 5 comments }

I operate a small web site on Cloud server powered by CentOS Linux v6.4. I would like to encrypt my site’s information and create a more secure connection. How do I create a self-signed SSL certificate on Nginx for CentOS/Fedora or Red Hat Enterprise Linux based server?

{ 10 comments }

I am a new nginx user and I would like to redirect all mobile / smart phone users from www.example.com to m.example.com domain. How do I detect a mobile phone browser in nginx? How do I redirect all mobile users to sub-domain using regex based rules? How can I automatically redirects visitors on mobile devices to its mobile version at http://m.example.com/ and also allow mobile devices to the desktop website at www.example.com if visiting via http://www.example.com/?desktop=true?

{ 4 comments }

Google Chrome/Chromium, Firefox and Opera browser support SPDY networking protocol. It enables faster browsing on supported sites. SPDY is similar to HTTP, with particular goals to reduce web page load latency and improve web security. SPDY achieves reduced latency through compression, multiplexing, and prioritization. How do I enable nginx SPDY support running on Debian or Ubuntu Linux server?

{ 2 comments }