Host multiple domains on one server with Apache

Apache allows you to host multiple domain names from a single IP address using Virtual Hosts. I’ll show you how to edit Apaches sites-enabled file to do this. First, open the 000-default file in /etc/apache2/sites-enabled/. It should look like this: We will want to add the following section to the bottom: replacing domain.com with your domain name […]

Confine SSH user to home directory with rbash

You can use rbash to limit a user to their own home directory (they cannot cd to other directories, or write to them). To do this, you will want to edit /etc/passwd and change the user’s shell: test:x:1001:1001:,,,:/home/test:/bin/bash should change to test:x:1001:1001:,,,:/home/test:/bin/rbash I did this on Ubuntu 12.04, so if your system varies from that […]