Domain name instructions

From TheInterWiki

Once your wiki is up and running and you want to make it official with a domain name and SSL certificate you will need to follow these steps

Domain name($)

You must first decide on a domain name. MyWiki.com is probably taken, so choose something unique to your facility or Physicians group. If there is an existing domain name that you are adding the wiki to, we suggest you use a sub-domain. It doesn’t cost extra to do this, you just need to add a record in the DNS settings for the existing domain name.

Example: If www.HeartPhysiciansGroup.com is the main website for the group, 
you can set wiki.HeartPhysiciansGroup.com to point to the new server.

Register a domain name

To register a new domain name, do the following:

  1. Log in to your AWS account.
  2. Go to EC2 -> Elastic IP’s.
  3. Allocate a new elastic IP.
    1. Make sure it is in the same region as your instance.
    2. There is no charge for an Elastic IP that is associated with a running instance.
    3. Once it is allocated to your account, associate it with your instance.
  4. Use the AWS search bar to find Route 53.
  5. From the Route 53 dashboard, purchase your domain name.

Point the domain name to your instance

  1. Create a new hosted zone. This is the address book for where you want incoming traffic for your domain name
  2. See Hosted Zone tutorial on AWS for a tutorial on hosted zones and records.
  3. If you are adding a sub-domain to an existing domain, ask your website administrator to create an “A” record in the DNS zone for your subdomain that points to your Elastic IP.
  4. Once this is done, you are almost there!

Add a VirtualHost file to your Apache web server

This tells Apache to send traffic for your domain name to the appropriate folder on your instance. Since the wiki files are in a sub-folder of the web directory, you have to tell Apache to forward it. This is how you can have multiple websites on the same server.

  1. Open your terminal program and connect to your command line.
  2. Open nano to create the file:
Sudo nano /etc/apache2/sites-available/wiki.conf
  1. Copy and paste the following:
<VirtualHost *:80>

ServerAdmin admin@your-domain.com
DocumentRoot /var/www/html/joomla/
ServerName your-domain.com
ServerAlias www.your-domain.com

<Directory /var/www/html/joomla/> 
Options FollowSymlinks 
AllowOverride All 
Require all granted 
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>