The $ should NOT be included. It is simply a way to denote that these commands aren't run as root (#).

To paste commands, copy them from here and middle-click in the terminal to paste them.

  1. Disable default vhost: $ sudo a2dissite default
  2. Navigate back to home directory: $ cd
  3. Create directory for websites: $ mkdir public
    • Skip this stage if you've already set up one website
  4. Create directories for your website: $ mkdir -p public/{public,log,backup}
  5. Fix file permissions: $ sudo chmod a+rx ~ ; sudo chmod -R a+rx ~/public
  6. Create configuration file for your domain: $ sudo nano /etc/apache2/sites-available/
    1. You can use this example config:
    2. Select the entire config file, copy, then paste it into the nano window by middle-clicking in the terminal.
    3. Replace all instances of with your domain and all instances of username with your system username.
    4. Save by hitting Ctrl + X, then Y, then Enter
  7. Create a symbolic link to help Apache find your website: $ sudo a2ensite
  8. Reload Apache: $ sudo service apache2 restart