Custom domain names allow your services to use an address that is different to the primary domain used on the control panel.
An example may be where you want your control panel to operate at panel.mediacp.net but your icecast services to operate from icecast.mediacp.net. All links that relate to your service would then be changed to icecast.mediacp, including:
- The direct service and stream address: https://icecast.mediacp.net:8000
- The public page address: https://icecast.mediacp.net/public/icecast
- The stream proxy addresses: http://icecast.mediacp.net/stream/icecast
This feature is disabled by default and must be enabled on each service individually before it can be used in the control panel. It is possible to enable the feature by default.
Notes & Limitations
- Available with MediaCP 2.10.7 and newer
- Only available with Audio Streaming services (Shoutcast & Icecast) at this point in time. We will be looking to support video streaming services in the near future.
- A Custom Domain should be configured with a CNAME record pointing to the primary hostname.
- CNAME records are only possible for sub-domains, it is not possible to configure the root domain name such as “mydomain.com”, only “subdomain.mydomain.com”.
- When using Bind IP Address, you may instead configure an A RECORD that points to this IP Address.
- Port 80/443 Proxy must be installed for this feature to work. This is because the MediaCP requires control over port 80 to automatically manage SSL certificates.
- If port 80 or 443 is in use by another service on your system, such as cPanel, Plesk, CentOS Web Panel or another service then it will not be possible to use this feature.
Usage Guide
Install Custom Domains on panel
You will need to run the Port 80/443 Proxy installation in order to begin using Custom Domains. If you are already using Port 80 / 443 Proxy then we recommend reinstalling the configuration.
If port 80 or 443 is in use by another service on your system, such as cPanel, Plesk, CentOS Web Panel or another service then it will not be possible to use this feature. This is because the MediaCP requires control over port 80 to automatically manage SSL certificates.
/root/init enable-http-proxy
Enable by default on new services
Custom Domains are disabled by default on new services. You can change this default behaviour by updating the setting within System Config -> Services tab.
Enable/disable on individual service
The Custom Domain Name can be configured on an individual service under the Features tab. Once enabled, the customer will be able to configure a custom domain name under the Advanced Tab.
Configure Custom Domain on a service
Troubleshooting
Error: DNS record for this domain is not configured correctly
The error relates to being unable to resolve the provided domain to the CNAME record of your panels domain.
Check the provided domain name is setup as a CNAME record and points to your MediaCP primary domain name.
We recommend checking the domain at whatsmydns.net; make sure to select the “CNAME” option and the result is the domain name of your primary control panel.
Error: There is a problem generating an SSL certificate for this domain.
An SSL certificate was unable to be provisioned for the domain name. There could be several reasons for this problem.
You should check the /usr/local/mediacp/log/autossl/custom.log file for more information on the problem.