Ubantu 20.04 LTS I have set up this server to replace a very old Mac OS server that will not serve a current version of TLS. While I was using Apache on the Mac, the version on the Ubantu requires different configuration, and I have overcome much of my issues. I have a number of sites that are running properly and a number of redirects that take the user from ***.com to ###.com I have site that I installed and configured and checked that is serving properly with https that I need to send a number of other sites to. I have set up the redirect on that site in a similar way to the ones that are working, yet I am not able to serve the proper site, they go to the default. I have configured and reconfigured with what I thought was working settings and yet I cannot seem to get it to work. This is the "target" conf file that is working:
<VirtualHost *:80> ServerName wescrap.ca ServerAlias www.wescrap.ca ServerAdmin webmaster@wescrap.ca DocumentRoot /var/www/wescrap.ca/public_html Redirect permanent / https://wescrap.ca
<Directory /var/www/wescrap.ca/public_html> Options -Indexes +FollowSymLinks AllowOverride All </Directory> ErrorLog ${APACHE_LOG_DIR}/wescrap.ca-error.log CustomLog ${APACHE_LOG_DIR}/-access.log combined </VirtualHost>
<VirtualHost *:443> ServerName wescrap.ca DocumentRoot /var/www/wescrap.ca/public_html
SSLEngine on SSLCertificateFile /var/www/wescrap.ca/public_html/SSL/wescrap_ca.crt SSLCertificateKeyFile /var/www/wescrap.ca/public_html/SSL/wescrap_ca.key SSLCertificateChainFile /var/www/wescrap.ca/public_html/SSL/wescrap_ca.ca-bundle
This is the code for the redirect that is not:
<VirtualHost *:80> ServerName toronto-scrap.com ServerAlias www.toronto-scrap.com Redirect permanent / http://wescrap.ca/ DocumentRoot /var/www/wescrap.ca/public_html
Would be most grateful for some suggestions as to a fix. Thanks!