nginx

/Tag:nginx

PHP FPM Errors After Upgrade

6obj0w9nop

By |June 10th, 2014|PHP, Security, Sysadmin|0 Comments

Nginx: Locking Down The WordPress Backend By IP Address

I recently looked at the server logs for a new site that had just launched and noticed alot of hits by random IP addresses being made to the WordPress login script. Similar to the excerpt below: 182.18.209.4 – – [10/Jun/2013:07:33:26 -0400] “POST /wp-login.php HTTP/1.1” 200 4807 “drinknycity.com/wp-login.php” “Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0” 200.75.126.115 – – [10/Jun/2013:07:36:29 -0400] “POST /wp-login.php HTTP/1.0” 200 4749 “drinknycity.com/wp-login.php” “Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0” 190.37.99.209 – – [10/Jun/2013:07:43:00 -0400] “POST /wp-login.php HTTP/1.0” 200 4749 “drinknycity.com/wp-login.php” “Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0” 85.105.213.253 – – [10/Jun/2013:07:47:18 -0400] “POST /wp-login.php HTTP/1.0” 200 4749 “drinknycity.com/wp-login.php” “Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0” 123.21.234.227 – – [10/Jun/2013:08:06:45 -0400] “POST /wp-login.php HTTP/1.0” 200 4749 “drinknycity.com/wp-login.php” “Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0” 190.26.124.56 – – [10/Jun/2013:08:10:43 -0400] “POST /wp-login.php HTTP/1.0” 200 4749 “drinknycity.com/wp-login.php” “Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0″ Without installing a dedicated plugin to log more details about the requests on the page. At a glance, it appears that automated bots are trying to brute force access to the WordPress backend of the site. If you are like me you most likely only need to access the back end of your WordPress sites from a couple of networks. So I am going to run through the process of locking down access by IP address to wp-login.php under nginx. Continue reading “Nginx: Locking Down The WordPress Backend By IP Address” »

By |June 11th, 2013|Linux, Security, Wordpress|0 Comments

PHP CGI 504 Gateway Timed Out Errors With Nginx

Recently I noticed that the nginx error log for a site I was working with was filling up with timeout messages similar to below: 2012/07/06 17:21:01 [error] 23897#0: *8870 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 173.25.1.129, server: project.com, request: “GET /jobs/update HTTP/1.0”, upstream: “fastcgi://127.0.0.1:9000”, host: “project.com” 2012/07/06 17:41:01 [error] 23897#0: *8960 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 173.25.1.129, server: project.com, request: “GET /jobs/update HTTP/1.0”, upstream: “fastcgi://127.0.0.1:9000”, host: “project.com” The script in question is normally called via a cron job, pulling alot of information from external sources and then storing for later reference to a local database. Loading the location in a browser resulted in the page working for awhile and then returning with a 504 Gateway timed out error page. So things obviously wern’t happening quick enough for the liking of nginx and it was recording the problem as a timeout error in the log file. Continue reading “PHP CGI 504 Gateway Timed Out Errors With Nginx” »

By |August 3rd, 2012|Linux, PHP|0 Comments