Hello
@webstuff,
You could also follow the steps referenced below to control what shows up when accessing a domain name that points to the cPanel server but isn't configured with Apache (e.g. ns2.domain.tld):
1. Navigate to WHM's
Include Editor interface
(WHM Home >> Service Configuration >> Apache Configuration >> Include Editor).
2. Select the
Pre Virtual Host Include option.
3. Select the Apache version from the menu. We recommend that you select
All Versions.
4. Enter the following text in the available text box:
Code:
<VirtualHost IPADDRESS:80>
ServerName HOSTNAME
DocumentRoot /usr/local/apache/htdocs
ServerAdmin EMAIL
<IfModule mod_suphp.c>
suPHP_UserGroup nobody nobody
</IfModule>
</VirtualHost>
<VirtualHost IPADDRESS:443>
ServerName HOSTNAME
DocumentRoot /usr/local/apache/htdocs
ServerAdmin EMAIL
<IfModule mod_suphp.c>
suPHP_UserGroup nobody nobody
</IfModule>
SSLEngine on
SSLCertificateFile SSLCERTIFICATEFILE
SSLCertificateKeyFile YOUR-SSLCERTIFICATEKEYFILE
</VirtualHost>
Note:
This example uses the following values:
- IPADDRESS represents the server's IP address.
- HOSTNAME represents the domain name you want to setup (e.g. ns2.nsdomain.tld).
- EMAIL represents your contact email address.
- SSLCERTIFICATEFILE represents the full file path to your SSL certificate.
- SSLCERTIFICATEKEYFILE represents the full file path to your SSL certificate's key.
5. Click
Proceed
6. Click
Update.
Thank you.