Koozali.org: home of the SME Server

Separate locations for secure and non-secure sites

Glenn Rice

Separate locations for secure and non-secure sites
« on: May 13, 2003, 08:14:27 AM »
I am currently setting up a web server using e-smith 5.6 and I would like to have a separate location for our secure and public sites.

i.e. If someone goes to http://testdomain.com they get the public home page, and if they go to http://httpS://testdomain.com they get the secure site home page.

I was thinking that I need to edit the section and change the DocumentRoot to an appropriate directory (perhaps, /home/e-smith/files/secure/html?). But, I cannot find what template for httpd.conf I need to edit!

I do not want to just edit /etc/httpd.conf direct as I'm sure I'll regret it at some point down the track.

Any help would be greatly appreciated.

Thanks.

Glenn

Guck Puppy

Re: Separate locations for secure and non-secure sites
« Reply #1 on: May 13, 2003, 09:47:44 PM »
Something like :

if (_SERVER["HTTPS"] ==   'on') {
   // show secure content
} else {
   // show normal content
}

no good?