Category Blog

Apache Virtualhost to WordPress Permalinks

WordPress Permalinks create RESTful link style like: blog/category/sub-cat/post-title. These are not actual directories in your Apache DirectoryRoot hence you cannot just set a subdomain to point to a WP Permalinks via DocumentRoot /var/www/category/blog/bla/bla/bla.

In my case I was trying to set security.addaxsoft.com to point to addaxsoft.com/blog/security. Many methods failed and the only trick that worked resides in RewriteRules and WordPress URL Parameters.

  1. Set new DNS A record. eg: security.addaxsoft.com some-IP-address
  2. Set new VirtualHost in your apache config file as follow:
    <VirtualHost *:80>
    ServerName security.addaxsoft.com
    DocumentRoot /var/www/
    RewriteEngine On
    RewriteRule . /var/www/index.php?category_name=[YOUR CATEGORY NAME]
    </VirtualHost>
  3. Restart Apache and you’re good...
Read More

Disable SSH Password Authentication and Use PublicKey Authentication Instead

I use my own VPS for hosting this website. Hence I get attacked on daily bases. The last time I checked the logs I had more than 2500 attempts to break into my SSH server from around the world. These attackers are mostly opportunistic I believe (or I hope!)

Since the number was very high, I decided to disable password auth and keep publickey auth only. It’s pretty simple.

Step 0: You already have public/private key set and configured in your ssh server and client.

Then you want to edit SHHd config file under:

First make sure you enable public-key authentication or you will lock yourself out!

Read More

KINGSTON KTL-TP1066 8Gb for MacBook Pro mid 2010

This is to confirm that a KINGSTON KTL-TP1066/4G x2 will work on a MacBook Pro (MacBookPro7,1) – mid 2010.

Although there is no sign on the internet that this will work on a Mac, I had to take the risk and test it myself (having to order one from US all the way to Qatar). It works like charm, and my Mac is super fast again running the latest version of OS X.

Here they upgrade a Ram for around 215$, I ordered the 8Gb sticks for 65$ only! You can also order other types of Rams online just make sure you have the same specifications as the one mentioned in your current installed Ram. Feel free to ask me about the model you have on the comment section.

Happy upgrading folks.

Read More