New in CWP Edge / LTSFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers. Available now in the Edge-Latest and LTS-Stable versions. Discuss in the forum

LSPHP / Cache ›
CWP Secure KernelKernel-level protectionEvery site in its own sandbox

Every PHP site, cron job and SSH session runs in its own profile that the kernel enforces. A hacked WordPress cannot read other accounts’ files, and crypto miners and unexpected processes are stopped. Discuss in the forum

Secure Kernel ›
CWP DataCenter PanelFree for CWPpro serversAll your servers on one screen

Manage all your CWP servers from one panel: live health, every hosting account, CWP and OS updates on many servers at once, backups, SSL, firewall and Telegram alerts. Discuss in the forum

DataCenter Panel ›
CWP Backup ServerFree for CWPpro serversBackups that ransomware cannot reach

Protected backups of all your CWP servers on a separate machine. Snapshots a hosting server cannot delete, and restore of files, databases, mail and whole accounts in the admin and user panel. Discuss in the forum

Backup Server ›
WordPress ManagerIncluded & freeWordPress managed from the panel

Install, secure, update, back up and clone WordPress sites without FTP. Updates are tested on a staging clone first and applied to the live site only when they pass, with a backup taken first. Discuss in the forum

WordPress Manager ›
CWP CageIsolationEvery account in its own cage

Per-account isolation built from Linux namespaces and cgroups. A break-in or a runaway script on one site cannot reach another account, the panel or the rest of the server; resource limits per hosting package. Discuss in the forum

CWP Cage ›
Script InstallerOne-click appsWordPress, Joomla, Moodle and more in one click

CWP’s own script installer in the user panel: pick an app, choose the domain and folder, and it is live in seconds with its database and admin login created automatically. Ready for LSPHP and LSAPI-Cache. Discuss in the forum

Script Installer ›
DNS ClusterFor every control panelOne DNS cluster for all your servers

Your servers keep creating domains as usual; the zones are collected into one authoritative PowerDNS cluster you control, with DNSSEC, roles and a full activity trail. Accepts CWP, cPanel, Plesk, DirectAdmin and BIND. Discuss in the forum

DNS Cluster ›
CWP BillingFree to useBilling and support system for hosting providers

Clients, services, invoices, payments, domains, server provisioning and support tickets in one place. All gateways, server modules and registrars are free, with free migration from WHMCS, ClientExec and Blesta. Discuss in the forum

CWP Billing ›
CWPproFrom $1.49 per monthEvery CWP feature unlocked

CWPpro is the professional version of Control Web Panel: all features, unlimited accounts, the latest CWP version and security fixes first. $1.49 per month or $11.99 per year. Discuss in the forum

Get CWPpro ›

Redirect Domain using CNAME outside of CWP Instance

Started by LiamTGCS, April 14, 2021, 11:50:09 AM

Previous topic - Next topic

LiamTGCS

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.

LiamTGCS

Have tried a few other work arounds but still can't get website.com to "mask/frame" (using CNAME) example.com.

Whenever I point website.com to example.com, navigating to website.com will take me to the CWP HTTP Test Page as mentioned.

Anyone with any idea on this would be sincerely appreciated as I'm still having troubles despite my attempts at trying to work around this. There's probably something I'm missing other than the vHost's file.


LiamTGCS


LiamTGCS

Still no luck with this - any help would be appreciated.

LiamTGCS

Any help would be sincerely appreciated. Thanks all.


ghoste

Hi LiamTGCS, if you want to open all example.com when you access website.com, you can add the same user, from CWP Admin - Domains - Add Domain (folder path / public_html), if both domains want to be on the same server, pay attention to DNS zones