Difference between revisions of "Domain name instructions"
Line 51: | Line 51: | ||
**ServerName: your domain name | **ServerName: your domain name | ||
**Server alias: a comma-delimited list of possible combinations of domain name and sub-domains. These should all have matching “A” records in your hosted zone. | **Server alias: a comma-delimited list of possible combinations of domain name and sub-domains. These should all have matching “A” records in your hosted zone. | ||
+ | |||
+ | *Use Ctrl-x to exit the editor, select y to save, hit enter to confirm the file name. | ||
+ | *Next disable the default account | ||
+ | sudo a2dissite 000-default.conf | ||
+ | *Enable the new file | ||
+ | sudo a2ensite joomla.conf | ||
+ | *Enable the Apache forwarding modules | ||
+ | sudo a2enmod rewrite ssl rewrite | ||
+ | *Restart Apache | ||
+ | sudo systemctl restart apache2 | ||
+ | |||
+ | You should be able to go to your domain in the web browser and see your wiki, but you will need to access it from http, not https. That will be taken care of in the next section. |
Revision as of 17:23, 21 March 2023
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:
- Log in to your AWS account.
- Go to EC2 -> Elastic IP’s.
- Allocate a new elastic IP.
- Make sure it is in the same region as your instance.
- There is no charge for an Elastic IP that is associated with a running instance.
- Once it is allocated to your account, associate it with your instance.
- Use the AWS search bar to find Route 53.
- From the Route 53 dashboard, purchase your domain name.
Point the domain name to your instance
- Create a new hosted zone. This is the address book for where you want incoming traffic for your domain name
- See Hosted Zone tutorial on AWS for a tutorial on hosted zones and records.
- 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.
- 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.
- Open your terminal program and connect to your command line.
- Open nano to create the file:
Sudo nano /etc/apache2/sites-available/wiki.conf
- Copy and paste the following:
<VirtualHost *:80> ServerAdmin admin@your-domain.com DocumentRoot /var/www/html/wiki/ ServerName your-domain.com ServerAlias www.your-domain.com, your-domain.com, wiki.your-domain.com <Directory /var/www/html/wiki/> Options FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
- Change the following:
- ServerAdmin: This should be the email for the wiki administrator. Usually the email account you set up for the AWS account.
- ServerName: your domain name
- Server alias: a comma-delimited list of possible combinations of domain name and sub-domains. These should all have matching “A” records in your hosted zone.
- Use Ctrl-x to exit the editor, select y to save, hit enter to confirm the file name.
- Next disable the default account
sudo a2dissite 000-default.conf
- Enable the new file
sudo a2ensite joomla.conf
- Enable the Apache forwarding modules
sudo a2enmod rewrite ssl rewrite
- Restart Apache
sudo systemctl restart apache2
You should be able to go to your domain in the web browser and see your wiki, but you will need to access it from http, not https. That will be taken care of in the next section.