Working with Joomla in HTTPS/SSL environment

Even our website does not contains sensitive information, Purdue ECN forced their Apache server run always under HTTP/SSL. It took so much time for me to figure out what’s going on at the very first time.

I want to comment few problems I faced while using Purdue ECN server to set Joomla up.

1. Using HTTP_X_FORWARDED_HOST instead of HTTP_HOST

Since the Joomla is referring variable HTTP_HOST in Apache server, which is charlotte-private.ecn.purdue.edu in the server. So Joomla created links with “charlotte-private.ecn” instead of “engineering. To solve the problemĀ  HTTP_X_FORWARDED_HOST should be used to create the base url of the Joomla.

In the file libraries/joomla/environment/uri.php change HTTP_HOST to HTTP_X_FORWARDED_HOST. There should be two occurrences, however the first is the important one.

$theURI = 'http' . $https . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

should be changed to:

$theURI = 'http' . $https . $_SERVER['HTTP_X_FORWARDED_HOST'] . $_SERVER['REQUEST_URI'];

Second, sending information through HTTPS instead of HTTP

This is the longest problem I’ve had. I have to re-install the Joomla to find out this problem. To make long story short, it was one small setting on the ‘Global Configuration’, I have to check all No to SEO Settings.

Last, having IE 8 security warning when using JA_purity template

I solved relatively easy on this one. I have to tweak php source code of ja_templatetools.php

	function baseurl(){
		//return JURI::base();
		return $this->baseurl;
	}

	function templateurl(){
		//return JURI::base()."templates/".$this->template;
		return ($this->baseurl)."templates/".$this->template;
	}

Instead of using JURI::base() used $this->baseurl.

Joomla is working fine, yet I’m looking to find a fine Bibtex plugin on Joomla. There’s one and only plugin for the Bibtex called J!Research, but MySQL setup doesn’t allow me to install the plug-in.

Advertisement

~ by hacktics on November 3, 2009.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.