Host a static site on Dubsdot
This is a tutorial on how to take a static HTML website and host it on our webserver, DubsDot
First, a folder needs to be created on DubsDot for all of your files to be located in. By default, this should be in
/var/www/. Then, place all relevant files into the directory. The directory and all contents need to be both the user and group of www-data. This should be the requirements for setting up all files needed
Next is setting up the config file for a virtual host. in /etc/apache2/sites-available/, create a foobar.conf where foobar is the name of the subdomain. The template for the config file is below
<VirtualHost *:80> ServerName foobar.cslabs.clarkson.edu ServerAlias foobar.cosi.clarkson.edu ServerAlias foobar DocumentRoot /var/www/foobar <Directory /var/www/foobar> Order allow,deny Allow from all </Directory> </VirtualHost>
a2ensite foobar and apache should be hosting the site now.
The final step is to set up DNS so one can navigate to the website. ssh into Talos and in the /etc/bind/db.cosi and /etc/bind/db.cslabs files, add the line under the CNAME section.
foobar IN CNAME dubsdot
As with usual DNS, increment the serial number at the top of the document and reload it with
rndc reload. If everything works out, you can go to the domain specified and the page should be up.