Adding multiple sites to a single instance

28th Feb 19

I am looking to add my Birds of Australia website to my amazon instance.  Currently I have this website hosted.  I will go through the process in adding more then one website to a single instance.

http.conf file

location of httpd.conf file

You will need to make a few adjustment to the apache configuration file.  This file is found in the conf folder.

httpd.conf file alteration
second httpd.conf alteration

Within the httpd.conf file edit the Overwrites from none to All and a the end of the file, add an additional line including the httpd-vhosts.conf file. 


image of amendments made to vhosts-httpd.conf file

The httpd-vhosts file can be found in the extra directory within the config folder (~/stack/apache2/conf/extra).  Each VirtualHost tag contains the information of each of the websites.  I created two new folders within htdocs folder and moved the files of the website to its corresponding websites.  Before I did this I had two domain names in which I pointed my static ip address to it.  

After I changed the configuration to the httpd-vhosts file, I restarted the server by running 'sudo apachectl restart'

The files for the website are found in ~/htdocs/ 

I have recently completed my apprenticeship.  I am currently building the API to a React JS site using Firebase.