Configuring hosts for apache on slicehost

  • Go to the place where the domain is registered (eg: hostmonster) and have it point to the, and
  • Create an apache virtual host file in /etc/apache2/sites-available/ Example:
  • # Place any notes or comments you have here
    # It will make any customization easier to understand in the weeks to come
    # domain: nycsubwayexplorer
    # public: /home/nick/
      # Admin email, Server Name (domain name) and any aliases
      # Index file and Document Root (where the public files are located)
      DirectoryIndex index.php
      DocumentRoot /home/nick/
           Options -Indexes
           AllowOverride All
           Order allow,deny
           allow from all
           AddHandler mod_python .py
           PythonHandler mod_python.publisher
           PythonDebug On
      # Custom log file locations
      LogLevel warn
      ErrorLog  /home/nick/log/
      CustomLog /home/nick/log/ combined
  • Create a link in sites-enable:
  • nick(nickporcaro): pwd
    nick(nickporcaro): ls -l sites-enabled/*
    lrwxrwxrwx 1 root root 40 Nov  6 04:57 sites-enabled/ -> ../sites-available/
  • Go to the DNS tab of the slice manager – pick duplicate on an entry on the right and then rename it to either the original ( in the example above) or an alias ( in the example above)