Redirecting a Subdomain on Bucket#
View the 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
-
Go to the bottom of the file where the virtual hosts stanzas are.
-
Update the stanza to change the “Redirect Permanent URL” to the correct URL.
-
Save.
-
Restart apache:
systemctl restart httpd
-
Make sure apache is running:
systemctl status httpd.service
-
Test on the web to see if the http redirect works.
-
Test other sites on Bucket to make sure you didn’t kill them.
-
Make sure that the Virtual Host settings here match what is in the ssl.conf file.
View the 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
-
Go to the bottom of the file where the virtual hosts stanzas are.
-
Update the stanza to add “Redirect permanent / [URL for the redirect to point to”.
-
Test on the web to see if the http redirect works.
-
Test other sites on Bucket to make sure you didn’t kill them.
-
Update the stanza to add “Redirect permanent / [URL for the redirect to point to.”
-
Save
-
Restart apache:
systemctl restart httpd
-
Make sure apache is running:
systemctl status httpd.service
-
Test on the web to see if the https redirect works.
-
Test other sites on Bucket to make sure you didn’t kill them.
-
Make sure that the Virtual Host settings here match what is in the httpd.conf file.