- Create an account for whitelabel domain in cpanel
- Create file template in “/var/cpanel/templates/[CPANEL_USER]”
/var/cpanel/templates/[CPANEL_USER]
- Fill file /var/cpanel/templates/[CPANEL_USER] with configuration below, make sure parameter [IP_PROXY], [CRT_PATH],[KEY_PATH],[RESELLER_ID],and [DOMAIN_PROXY] has been adjusted base on your configuration
<VirtualHost [IP_PROXY]:443>
SSLEngine on
SSLProxyEngine On
SSLCertificateFile [CRT_PATH]
SSLCertificateKeyFile [KEY_PATH]
RequestHeader set srsx-enable-ssl "TRUE"
ProxyPreserveHost On
ProxyPass / http://srb[RESELLER_ID].srs-x.com/
ProxyPassReverse / http://srb[RESELLER_ID]379.srs-x.com/
ServerName [DOMAIN_PROXY]
</VirtualHost>
- Compile with command below, make sure CPANEL_USER and [DOMAIN_PROXY] has been adjusted:
perl -MYAML::Syck -e 'my $hr = YAML::Syck::LoadFile($ARGV[0]);$hr->{$ARGV[1]} = $ARGV[2];YAML::Syck::DumpFile($ARGV[0],$hr);' /var/cpanel/userdata/[CPANEL_USER]/[DOMAIN_PROXY] custom_vhost_template_ap2 /var/cpanel/templates/[CPANEL_USER]
- Rebuild httpd conf:
/scripts/rebuildhttpdconf
- Restart httpd
/etc/init.d/httpd restart