The Eclectic Quill

Website of Joshua McGee

By

Faith from Fable

"How proud are you, being able to gather faith from fable?" — Layne Staley

"How proud are you, being able to gather faith from fable?" — Layne Staley

By

Facebook “Like” button is lower than Twitter and Google Plus buttons

By default, the Facebook "Like" button will be misaligned relative to other social buttons:

facebook-like-button-too-low

The fix is to add this to your CSS:

.fb_iframe_widget span {
  vertical-align: top !important;
}

… and you should be good to go:

facebook-like-button-just-right

By

Something fueled by words I learned to hate

I was never the right one to bear the weight of something fueled by words I learned to hate. -- Myles Kennedy, Alter Bridge

I was never the right one to bear the weight of something fueled by words I learned to hate. — Myles Kennedy, Alter Bridge

By

God is nowhere to be found

Now you've got both sides claiming 'killing in god's name', but god is nowhere to be found, conveniently. -- Eddie Vedder

Now you've got both sides claiming "killing in god's name", but god is nowhere to be found, conveniently.  — Eddie Vedder

By

Use nginx to block referrer spam from Semalt and others

If you run a website, you have surely seen an increase in referrer spam lately.  In this type of spam, an organization will fake the Referer header of an HTTP request so that the webmaster will notice the spammer.  However, this throws off your site analytics and taxes your server, because each request sends the spammer a full copy of the page.

Semalt — a fake SEO tool that has hijacked a botnet for its spam — is currently the worst offender, but there are plenty of others.

If you use nginx to serve your webpages (or use it as a proxy to Apache), however, you can detect these referrers and block them across all your sites.

To begin, create a directory for global nginx rules:

sudo mkdir /etc/nginx/global
sudo pico /etc/nginx/global/referer-spam.conf

Paste the following into the editor, save, and exit:

##
# Referrer exclusions
##

if ($http_referer ~ "(semalt\.com|buttons-for-website\.com)") {
  set $prohibited "1";
}

if ($prohibited) {
  return 403;
}

The preceding configuration blocks semalt.com and buttons-for-website.com, two major offenders, but you can block whatever referrers you like.  The regular expression syntax is to take the hostname, escape all periods with a backslash, join them with a vertical bar character, and surround them with parentheses.

Then, in each site's configuration file, add the following line:

server {
  … all the stuff that's there already …

  include /etc/nginx/global/*;
}

Yes, it's kind of a pain that you have to repeat this for every site, but you can reuse this in the future by putting new global directives in the /etc/nginx/global/ directory.  If you have a site template file, I recommend adding the above line to it.

Then restart nginx:

sudo service nginx restart

... and you should be good to go.

http://eclecticquill.com/viagra/generic-viagra-india/, generic prices online cialis, http://eclecticquill.com/xanax/ordering-xanax-online-without-prescription/, http://eclecticquill.com/viagra/how-much-viagra-should-i-take/