Good afternoon all,
I currently have CWP setup with Apache.
I have tried tinkering with the conf.d files (Including the SSL config file), however, I have had no luck.
Essentially, I have a CWP User with domain example.com, with a website setup and working great, no issues.
I want to point another domain, let's say: website.com to example.com using CNAME.
The reason for this is that I have a URL shortening script which allows for custom domains to be linked to the script.
I have tried adjusting/editing the conf.d files for example.com to try and allow website.com (and other domains pointed to example.com). When I point website.com to example.com using CNAME and load website.com in a browser, it shows the "HTTP Test Page" from CWP, and it does NOT show the content on example.com.
I have tried tinkering around, including copying the conf.d configuration as suggested by the developer of the script, however, I feel there is a misconfiguration somewhere with CWP and/or Apache, since it is wanting to handle the domain, website.com, as if it were a new domain pending to be linked to a CWP user account.
The virtual host recommended by the script developer is as it comes below - FYI, I have attempted to configure both conf.d files, including the SSL conf file, to no avail. Not sure where I'm going wrong in this particular instance, or if there are additional files I need to edit in order to allow website.com to CNAME example.com...
(IP Changed for privacy)
<VirtualHost 123.123.123.123:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/kutitnet/public_html
<Directory "/home/examplecom/public_html">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
CustomLog /usr/local/apache/domlogs/kutit.net.bytes bytes
CustomLog /usr/local/apache/domlogs/kutit.net.log combined
ErrorLog /usr/local/apache/domlogs/kutit.net.error.log
<IfModule mod_dir.c>
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
</IfModule>
</VirtualHost>
I also did the same for the SSL Config file, adding the required SSL certificates.
Unfortunately, as mentioned, when I visit website.com, it takes me to the HTTP Test Page instead of the content hosted on example.com. I DO NOT want to have to add website.com to the CWP user panel, and I don't want to have to manually add the domain into any config files if I don't have to, as I have clients who I want to be able to point their domains to example.com and allow the script to accept/reject traffic according to how their account is setup on the PHP script hosted on example.com.
To clarify, everything works great when visiting example.com. Somewhere within CWP is preventing website.com from using example.com as a CNAME, and it CWP wants to handle it as if it were an add-on domain.