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

I have setup nginx as a secure reverse proxy server. How do I redirect all http://example.com/ requests (traffic) to https://example.com/ under nginx web server?
[click to continue…]

I was told that to improve resource download parallelization in IE8 I need to send the character set to the HTTP Content-Type response header. How do I set charset utf-8 under nginx web server running on Unix like operating systems?
[click to continue…]

I've changed the domain name from long-domain-name-example.com to example.com which is shorter and easy to remember. How do I redirect old domain to new domain with "HTTP/1.1 301 Moved Permanently" status code under nginx web server running on Unix like operating systems?
[click to continue…]

How do I replace upstream "Location: http://server1.cyberciti.biz:8080/app/" http/301 response-header with "Location: http://www.cyberciti.biz/app/" in the response of the proxied server using nginx?
[click to continue…]

HowTo: Nginx Block User Agent

How do I block a http user agent or a software agent using Nginx web server under Linux or Unix like operating systems?
[click to continue…]

How do I redirect old ugly urls such as http://example.com/store/view.jsp?product=foo with clean url - http://example.com/store/view/product/foo using nginx reverse proxy?
[click to continue…]

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…]