≡ Menu


Nginx: Allow All But Block Certain POST Request URLS For Selected Spammer IP Address/CIDR

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 to access my blog but block IP address accessing only example.com/blog/wp-comments-post.php? How do I block POST requests for selected IPs/CIDR on nginx?
[click to continue…]

Nginx: Block URL Access (wp-admin/wp-login.php) To All Except One IP Address

I am the small business owner and runs my own web-site. I have noticed increased cracking activity against by blog. What's the best way to block WordPress URLs such as example.com/blog/wp-login.php and example.com/blog/wp-admin/ in the nginx web-server?
[click to continue…]

nginx: See Active connections / Connections Per Seconds

How do I monitor my nginx server status and connections requests per seconds under Linux or Unix like operating systems?
[click to continue…]

HowTo: Nginx Redirect All HTTP Request To HTTPS Rewrite Rules

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

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

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

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

Nginx: 24: Too Many Open Files Error And Solution

I'm getting the following error in my nginx server error log file:

2010/04/16 13:24:16 [crit] 21974#0: *3188937 open() "/usr/local/nginx/html/50x.html" failed (24: Too many open files), client: 88.x.y.z, server: example.com, request: "GET /file/images/background.jpg HTTP/1.1", upstream: "", host: "example.com"

How do I fix this problem under CentOS / RHEL / Fedora Linux or UNIX like operating systems?
[click to continue…]

Nginx Force (Redirect) WWW.Domain.COM To Domain.COM

I know how to force and redirect www.example.com to example.com under Lighttpd web server. How do I force nginx web server to redirect www.example.com/page/1/2/3 to example.com/page/1/2/3?
[click to continue…]