≡ Menu

Nginx

Linux / Unix Curl: Find Out If a Website Is Using Gzip / Deflate

How do I find out if a web-page is gzipped or compressed using Unix command line utility called curl? How do I make sure mod_deflate or mod_gzip is working under Apache web server?
[click to continue…]

HowTo: Nginx Webserver Send Charset utf-8 Under Unix

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

Nginx Redirect (Rewrite) Old Domain To New Domain With HTTP 301

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 To Set Readonly File Permissions On Linux / Unix Web Server DocumentRoot

How do I set a read-only permission for all of my files stored in /var/www/html/ directory?
[click to continue…]

Nginx Redirect URL With HTTP/1.1 301 Moved Permanently Header

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

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