Adding a New website to Bucket#
Get New DNS Entry#
-
Email ITS and ask them to create a DNS entry for the site you want to make:
Please create internal and external DNS A records for [sitename].library.nashville.org and point it to this IP: [get bucket IP from password manager].
-
When ITS completes the DNS entry work, test on terminal:
- Type: dig [subdomain].library.nashville.org
- This should return the bucket IP if it is set up correctly.
Create Site Folder and Index File#
-
Create a new folder for the site:
- In terminal, log in to the server.
- Go to data/www/:
cd data/www/
- Create a new folder:
mkdir [sitename]
-
Update permissions on the new folder:
sudo chown apache:apache [folder-name]
-
Inside the new [sitename] folder, create a file called index.html.
Create a Stanza for the HTTP Version of the Site#
-
Go to /etc/httpd/conf:
cd etc/httpd/conf
-
Edit the httpd.conf file:
sudo nano httpd.conf
-
Update the stanza to add the new site.
-
Restart apache:
systemctl restart httpd
-
Make sure apache is running:
systemctl status httpd.service
-
Test on the web to see if you can get to the new site's index.html page.
-
Make sure that the Virtual Host settings here match what is in the ssl.conf file.
Create a Stanza for the HTTPS Version of the Site#
-
Go into /etc/httpd/conf.d:
cd etc/httpd/conf.d
-
Edit the conf file with nano:
sudo nano ssl.conf
-
Jump to the bottom of the file where the virtual hosts stanzas are.
-
Add a new
<VirtualHost>
stanza by copying an existing setup and pasting below.- Put your cursor where you want to start highlighting.
- Type this key combination to set the starting mark: Ctrl + Shift + 6
- Use the down arrow (or up arrow) to start highlighting.
- Cut the highlighted text (because we cannot find a command for copy): CTRL + K
- Paste once: CTRL + U
- Paste again: CTRL + U
- Edit the second pasted copy so it uses the new [sitename].
- Save
-
Restart apache:
systemctl restart httpd
-
Make sure apache is running:
systemctl status httpd.service
-
Test on the web to see if you can get to the new site's index.html page.
-
Make sure that the Virtual Host settings here match what is in the httpd.conf file.