Hi,
I have a newbee question.
How do I get https://domain:2083 redirected to https://host:2083 so the user won't get a warning about name mismatch for the SSL certificate. Assuming there is an SSL certificate installed for the server's hostname. This is when a user types in http://domain.com/securecontrolpanel.
The related file: /usr/local/cpanel/cgi-sys/sredirect.cgi looks like this:I've tried to put the hostname instead of $ENV{'HTTP_HOST'}, but that didn't work.#!/usr/bin/perl -T
open(CPCONF,"/var/cpanel/cpanel.config");
while(<CPCONF>) {
if (/^port=(\d+)/) {
$port = $1;
}
}
close(CPCONF);
if ($port eq "") { $port = '2082'; }
$port++;
if ($ENV{'HTTP_HOST'} ne "") {
print "Location: https://$ENV{'HTTP_HOST'}:${port}\n\n";
exit;
}
print "Location: https://$ENV{'REMOTE_ADDR'}:${port}\n\n";
Is there a solution to this?



LinkBack URL
About LinkBacks
Reply With Quote







