Search Engine Optimization | Internet Marketing | Webmastering Blog

unable to resolve host – not found or unable to stat

Debian 7 Apache 2.2.22 Virtualhost with only one website using ssl – ssl certificate is for (not The following setup resolves the “unable to resolve host” error /etc/hosts localhost /etc/hostname However, now we have a new apache error [error] [client] script ‘/var/www/wp-cron.php’ not found or unable to stat Change hosts to /etc/hosts

Checklist when rc.local does not run on boot on Debian 7 Wheezy

Checklist when rc.local does not run on boot on Debian 7 Wheezy Make sure file is located /etc/rc.local Permissions root:root 755 The shebang is in place in the first line #!/bin/sh -e You bash script has a . and full path ./home/me/ The last line must be exit 0

script /var/www/wp-cron.php not found or unable to stat

[error] [client] script /var/www/wp-cron.php not found or unable to stat localhost localhost.localdomain yourdomain1 yourdomain2 And those lines must have a few blank lines above the in the hosts file, or they will get overwritten each reboot.

htaccess force SSL for WordPress

This works for me on Apache 2.2 with VirturalHosts. Plus other useful stuff here. <IfModule mod_rewrite.c> RewriteEngine On Options -Indexes Options +FollowSymLinks RewriteBase / # Force HTTPS RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}/$1 [L] # Deny access by your most hated visitors and bad bots RewriteCond %{HTTP_USER_AGENT} mechanize [NC,OR] # Protect against SQL INJECTION RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [OR] RewriteCond %{QUERY_STRING}...

Format USB and Unzip img to memory stick

Insert the USB stick Type [sudo fdisk -l] [enter] (-l is lower case L) You should see a line: Disk /dev/sdb: xxxxMB, xxxxxxxxxxxxxxbytes LOOK FOR > sdb < NOT sda the xxx should roughly match the size of the USB memory stick >> This confirms the device we want is sdb there should be NO * under Boot [a] –...

Virus and Trojan Advice

Install more than 1 browser on your computer. 3 is ideal. Only read email with one (Iceweasel is my preferred) and only THAT ONE. On THAT ONE install the plugins: HTTPS Everywhere No Script (don’t enable any suspect websites to run scripts) Click&Clean (use it) Dont open email that you are not certain it is safe. If it comes from...

Mark Bad Blocks Check Hard Drive Linux

Which disk? sudo fdisk -l Non-destructive read-write test If you want to preserve your data try this first sudo badblocks -svn /dev/sdb smartmon Check to see if your fix worked sudo apt-get install smartmontools sudo smartctl –all /dev/sdb sudo smartctl -A /dev/sdb sudo smartctl -a /dev/sdb | grep -i reallocated Use DD to automatically mark bad blocks – destructive if...

[Webmaster Tools] Googlebot can’t access your site

I am posting this unsolved mystery – as an ongoing problem – instead of posting to a forum. Comment if you like. I’l update when I find the solution. I get the typical message from Google [Webmaster Tools] Googlebot can’t access your site. I run LAMP servers with Netfilter (iptables) with PSAD and Fail2ban. I check iptables for any...

How To Use DD to Wipe Hard Drive

Helpful to know which device is which fdisk -l Will write zeros to sda dd if=/dev/zero of=/dev/sda bs=1M Write random numbers to sda dd if=/dev/urandom of=/dev/sda bs=1M Wipe the MBR dd if=/dev/zero of=/dev/sda bs=446 count=1 or just add the partition number to sda to wipe certain partitions Creates an ISO disk image from a CD-ROM; in some cases the created...

fail2ban.actions.action: ERROR iptables -D

fail2ban.actions.action: ERROR iptables -D INPUT -p tcp -m multiport –dports http,https -j fail2ban-apache-xxxxxxxxxxxxxxxxxxx iptables -F fail2ban-apache-xxxxxxxxxxxxxxxxxxx iptables -X fail2ban-apache-xxxxxxxxxxxxxxxxxxx returned 200 iptables only allows rules of up to 30 characters Shorten the name of the conf file solves the error

How To Solve Swappiness (Apache) Problem

Swappiness is a Linux kernel parameter that controls the relative weight given to swapping out runtime memory, as opposed to dropping pages from the system page cache. Swappiness can be set to values between 0 and 100 inclusive. A low value causes the kernel to avoid swapping, a higher value causes the kernel to try to use swap space. The...

Install PHP for WordPress

There is not much to installing PHP except when you need more power. Sometimes WordPress needs more. sudo apt-get install php5 php-pear php5-mysql php5-cli php5-gd php5-curl curl sudo vi /etc/php5/apache2/php.ini max_execution_time = 300 max_input_time = 60 memory_limit = 256M post_max_size = 64M upload_max_filesize = 64M

Setup a LAMP Server on Debian or Ubuntu

  SSH to your server ssh root@IP Update Debian/Ubuntu apt-get update && apt-get upgrade –show-upgraded -y Create User How To Create a User in Linux Setup SSH for Remote Access With GPG Keys – No Password How To Setup SSH for Remote Access IMPORANT – Block All Traffic to your Server While You Set it Up Block All Traffic (but...