I set up TLD.COM using VirtualMin. I then chose to setup a SSL website.
When I try to got to “https://TLD.COM” the only error message I can see in FireFox is: “(Error code: ssl_error_ssl2_disabled)”
I have also tried using IE ver. 8 with all the SSL 3.0 and 2.0 options enabled and the pages aren’t served up by Apache.
I have only one external IP that TLD is served by. I only have one SSL site and that’s for the TLD on the one external IP. Do I have to have a separate IP for the SSL site?
[Thu May 20 11:57:49 2010] [error] [client 192.168.0.1] PHP Notice: Undefined index: HTTP_HOST in /var/www/html/libraries/joomla/environment/uri.php on line 164
I am using Joomla 1.5.17…
Could this be a coding error in Joomla??
Below is the code in URI.PHP that causes the issue:
// IIS uses the SCRIPT_NAME variable instead of a REQUEST_URI variable… thanks, MS
$theURI = ‘http’ . $https . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘SCRIPT_NAME’];
The section of code is below:
function &getInstance($uri = ‘SERVER’)
{
static $instances = array();
if (!isset ($instances[$uri]))
{
// Are we obtaining the URI from the server?
if ($uri == 'SERVER')
{
// Determine if the request was over SSL (HTTPS)
if (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) != 'off')) {
$https = 's://';
} else {
$https = '://';
}
/*
* Since we are assigning the URI from the server variables, we first need
* to determine if we are running on apache or IIS. If PHP_SELF and REQUEST_URI
* are present, we will assume we are running on apache.
*/
if (!empty ($_SERVER['PHP_SELF']) && !empty ($_SERVER['REQUEST_URI'])) {
/*
* To build the entire URI we need to prepend the protocol, and the http host
* to the URI string.
*/
$theURI = 'http' . $https . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
/*
* Since we do not have REQUEST_URI to work with, we will assume we are
* running on IIS and will therefore need to work some magic with the SCRIPT_NAME and
* QUERY_STRING environment variables.
*/
}
else
{
// IIS uses the SCRIPT_NAME variable instead of a REQUEST_URI variable... thanks, MS
$theURI = 'http' . $https . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];
// If the query string exists append it to the URI string
if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
$theURI .= '?' . $_SERVER['QUERY_STRING'];
}
}
// Now we need to clean what we got since we can't trust the server var
$theURI = urldecode($theURI);
$theURI = str_replace('"', '"',$theURI);
$theURI = str_replace('<', '<',$theURI);
$theURI = str_replace('>', '>',$theURI);
$theURI = preg_replace('/eval\((.*)\)/', '', $theURI);
$theURI = preg_replace('/[\\\"\\\'][\\s]*javascript:(.*)[\\\"\\\']/', '""', $theURI);
}
else
{
// We were given a URI
$theURI = $uri;
}
// Create the new JURI instance
$instances[$uri] = new JURI($theURI);
}
return $instances[$uri];
}
No, the error you’re getting appears to be at the Apache or browser level, not at the Joomla code level.
Also, you shouldn’t need an additional IP address if this is the only SSL site you’re hosting on that IP address.
As Ronald mentioned, something may be awry with the SSL settings on your server. If you post your ssl.conf file, we can look it over and see if the problem stands out.
Both the “http.conf” and “ssl.conf” Conf files are attached… I also noticed that the sever is pulling from the “/var/www/html directory” and not the “/home/my-tld/public_html” directory.
I have subtituted “my-tld.com” or “my-tld” for my actual TLD… if that mucks things up then I will send the unedited versions…
OK… so i commented out with # the “NameVirtualHost *”. in the “edit config files” under Apache in the server section. Saved it and then restarted Apache. I did it a couple times to make sure.
Attached is the error in the /var/log/httpd/error_log. No errors noted after restart but error after I try to access the SSL website. Also still pulls from the /var/www/html directory for the TLD website instead of public_html directory…
the following shows up in the access_log for Apache
I have the SSL site running in /home/my-tld/secure directory
I have the Website running in /home/my-tld/public_html directory
Apache pulls from the /var/www/html directory
Since neither of the “virtual sites” appears to be noticed by Apache, I am assuming the Apache config
files are messed up.
In the var/log/my-tld/error_log it reads:
[Thu Jun 03 16:50:46 2010] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jun 03 16:50:46 2010] [warn] RSA server certificate CommonName (CN) www.alaskaadjusters.com' does NOT match server name!? [Thu Jun 03 16:50:46 2010] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Thu Jun 03 16:50:46 2010] [warn] RSA server certificate CommonName (CN) www.alaskaadjusters.com’ does NOT match server name!?
[Thu Jun 03 16:52:46 2010] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jun 03 16:52:46 2010] [warn] RSA server certificate CommonName (CN) www.alaskaadjusters.com' does NOT match server name!? [Thu Jun 03 16:52:46 2010] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Thu Jun 03 16:52:46 2010] [warn] RSA server certificate CommonName (CN) www.alaskaadjusters.com’ does NOT match server name!?
you still have these entries in your httpd.conf:
NameVirtualHost *
NameVirtualHost 69.161.20.100:80
NameVirtualHost 69.161.20.100:443
NameVirtualHost 192.168.0.34:80
NameVirtualHost 192.168.0.34:443
those are giving troubles. try comment them out all together.
The IP is in the virtualhost container where it should be
In your ssl.conf is
Listen *:443
the * should be replaced with the IP of the server (69.161.20.100)
then restart apache and look for any errors in the logs.
Also your dns looks like it could use some major tweaking. Are you using some dynamic dns service?
SOA entry isn’t correct, you do not have a FQDN
The SOA record is:
Primary nameserver: lenorman
Hostmaster E-mail address: admin