Tag: /etc/init.d/nginx restart
How to log real user’s IP address with Nginx in log files
last updated in Categories CentOS, Debian / Ubuntu, FreeBSD, Linux, Networking, Nginx, UNIXNginx: Redirect Backend Traffic Based Upon Client IP Address
last updated in Categories Linux, Nginx, UNIXI 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?
Nginx: Allow All But Block Certain POST Request URLS For Selected Spammer IP Address/CIDR
last updated in Categories Linux, Nginx, Security, UNIXI 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?
Nginx: 301 Redirect To A Domain Name
last updated in Categories Linux, Nginx, UNIXNginx Redirect Mobile / Smart Phone Traffic To Mobile Version Of the Web Site
last updated in Categories Linux, Nginx, UNIXI 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?