Generic Server Setup Tricks


On Linux (at least ubuntu), the correct way to set a FQDN (fully qualified domain name, eg; the hostname in this case would be killer) is to edit both /etc/hosts:

<primary ip>    <fqdn>  <hostname>   localhost

and /etc/hostname:


See also debian and freebsd tricks.


You probably want to hide your bind verison name to prevent scanning and attacks. Edit /etc/bind/named.conf or /etc/bind/named.conf.options and add this line to the options block:

version "Withheld";


ntp servers listen on port 37.


The temboz feed reader is started by:

$ ./temboz --server &

in the appropriate directory.

File Hierarchy


Root for server files, scripts, and databases


Subdirectories for each virtual host live in this folder, with further subdirectories for different dynamic services or static serving. /www/ is for static html content.


Default pages like 404.html or 50x.html live here.


Bare git repositories are stored here; those with a file git-daemon-export-ok get served up through a web interface and can be publically cloned.


Database dumps and backups get put in subdirectories here; this whole directory can be rsynced to a remote location.


Database files (sqlite, passwds, etc) go in subdirectories here. Usually has crazy r/w permissions!

Ruby on Rails Deployment: Phusion Passenger

This method replaces the nginx binary. It uses <> Phusion Passenger on Ubuntu Server:

nano /etc/apt/sources.list  # uncomment the 'universes' lines
sudo aptitude update
sudo aptitude install ruby ruby1.8-dev rubygems build-essential libopenssl-ruby libssl-dev zlib1g-dev
sudo aptitude install irb1.8 bzip2 unzip less screen wget curl sysinfo # Optional
sudo gem install passenger
sudo /var/lib/gems/1.8/bin/passenger-install-nginx-module