Adding additional ssh-keys to your .ssh

Usually people will just create one key with just default command 

ssh-keygen 

get a public/private pair in (/Users/my_user/.ssh/id_rsa) and use that for anything, but there is much more to this then that. You can create many keys and use them for separate accounts and also automate that.

For example

LEMP, NGINX stack - Only home page works fine, all others give 404 error

If you have a problem where you have LEMP Stack (Nginx instead of apache) and you get 404 on all pages but front you probably need to change one line in your "/sites-enabled/your-iste" file. So lets open this nginx file that defines virtual block and change the part under "location" directive from
 

Installing composer on dedicated server

If you are having problems with installing composer on your dedicated server try it like this

sudo curl -s https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

also check if you have openssl enabled as extension in your php.ini (this depends on php version)

Drush download drupal 7 into the current directory

For drupal 8 you will probably use more complex framework with composer at leas but for drupal 7 you still might use drush just to download drupal core. So to do that into the current directory you are at, use this command

drush dl drupal-7.x --drupal-project-rename="../${PWD##*/}" -y

It will overrun everything you have in that directory.

Mixed vagrant enviroments, check where does url load from

I had many vagrant machines and haven't really paid much attention to setting unique hostname, machine name and IP address, which resulted in mixed environments. Meaning I loaded one URL and I got files and database from the other vagrant machine. To debug what was really happening I went into devel/php and found out where is my mind I mean Index file :) to do that I echoed it like this.