Purpose of site

For the moment, I plan on using this as a dumping ground for Linux stuff that I need to do frequently but can never remember. I imagine I'll also write up the occasional tutorial or blog.

I know some places have linked here for Windows sgminer builds. I don't think I'll be putting those up anymore. But keep your eyes peeled for a tutorial on how to build them yourself.

Generate private keys for use with PuTTY and SSH and disable password and root logins

Generate and save keys from PuTTYgen

Paramaters

  • Paramaters: SSH-2 RSA
  • Number of bits in a generated key: 4096 (more is better, so why not?)

Click "Generate" and move the mouse around a bit to generate entropy.

Set comment to something identifiable, like the machine name.

Set passphrase as desired.

Copy the public key in the top of PuTTYgen and save it on the remote host, under ~/.ssh/authorized_keys. RIght click Select, then Right Click Copy. Ctrl A doesn't work.

SSL redirect in Apache

Edit an existing virtualhost file, changing the Virtualhost line (probably ) to:

<VirtualHost _default_:443>

Then before that VirtualHost, in the same file, add this VirtualHost. Changing the URL's as needed, of course.

<VirtualHost *:80>
   ServerName www.example.com
   Redirect permanent / https://www.example.com/
</VirtualHost>

Restart Apache.

Apache Virtual Hosts under Ubuntu

Creating virtual hosts for the same domain under an Ubuntu install.

Go to /etc/apache2/sites-available and make a copy of default.

cd /etc/apache2/sites-available
sudo cp  *default.conf vhost.conf

Edit the resulting vhost.conf file and update the following to match the FQDN and documentroot

DocumentRoot /var/www/vhost
ServerName vhost.example.com

Create a symlink in the enabled directory and restart Apache

Subscribe to Giga Cog RSS