It happens sometimes, a server you are responsible for seems to be sending out spammy emails, and its normally caused by legacy or insecure code. The mail log indicates there are plenty of potential spam messages going out that are originating locally but most Linux servers host a lot of…
Read More
Command Line Tips: Program Execution
Executing commands is an integral part of using any Linux system. To follow up on my post about navigating file systems from the command line ( Linux Tips: File & Directory Handling ) more effectively, I am I have picked up over the years. Discovering What Shell You Are In…
Read More
Linux Tips: File & Directory Handling
My desktop and all of the servers I own are Linux or Unix based. So as a result I tend to find myself in a terminal navigating file systems and working with files more often than not. Command line file management allows you to wield crazy amounts of power but…
Read More
Deleting all mail for a local server account
It happens, cron jobs can and will go wrong occasionally and when they do, they love to send alerts to the job’s owner hoping for a little attention. An alias can always be added to the /etc/alias file directing all of the mail for an address to to /dev/null but…
Read More
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: [codesyntax lang=”text”] 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…
Read More
Changing the web root of a cPanel acccount
As a rule I try to avoid cPanel for hosting sites, I find the overhead of the control panel and the limited flexibility too confining for all but the simplest of sites. Occasionally though I need to deploy sites at work though to cPanel servers due to client requirements. The…
Read More
Mirroring a website with wget
Clueless clients and bad briefs can make a developers life very difficult at times so sometimes it comes in handy to be able to replicate a site in its entirety to review. Rsync could be used to mirror the files to a local location but it doesn’t really fit this…
Read More
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”,…
Read More
Raspberry Pi Overclocking
Like just like alot of other people as soon as the Model B Raspberry Pi went on sale in March I eagerly rushed out and ordered one from Element 14. Due to production delays this didn’t arrive till the start of June.ย But given its size, specs and price I…
Read More
Watching the progress of a dd action
dd is one of those indispensable Unix / Linux utilities whether its cloning or wiping a drive or simply creating a bootable flash drive from an image file. The problem is operations like wiping a drive with the output from /dev/zero can take an extremely long time especially on larger…
Read More