Forum Moderators: phranque

Message Too Old, No Replies

Forcing SSL usage - Pelase See Details inside

         

atoyf

1:13 am on Dec 7, 2004 (gmt 0)

10+ Year Member



Greetings,

I need some help with automating "translation" of http requests to htpps.

This is the situtation:
I have one IP. I have two sites: ***.com and mail.***.com.

The mail.***.com lives in apache DocumentRoot and ***.com live in DocumentRoot/website. This is just how it came out and i can't change it.

I have httpd.conf with the following vhost section:
Listen 80
<VirtualHost 192.168.0.15:80>
ServerAdmin administrator@***.com
ServerName ***.com
DocumentRoot /usr/local/www/data/website
ErrorLog /var/log/***.com-error_log
CustomLog /var/log/***.com-access_log common
</VirtualHost>

And i have ssl.conf with the following vhost section:
<VirtualHost 192.168.0.15:443>
ServerName mail.***.com:443
DocumentRoot "/usr/local/www/data"
ServerAdmin administrator@***.com
<Directory "/usr/local/www/squirrelmail">
Options Indexes ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /squirrelmail/ "/usr/local/www/squirrelmail/"
Alias /isoqlog/images/ "/usr/local/share/isoqlog/htmltemp/images/"
Alias /phpMyAdmin/ "/usr/local/www/phpMyAdmin
Alias /icons/ "/usr/local/www/icons/"
ScriptAlias /cgi-bin/ "/usr/local/www/cgi-bin/"
<Directory "/usr/local/www/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/***.com-error_log
CustomLog /var/log/***.com-access_log common
..........

If i go to:
***.com or mail.***.com they open up the same page from
DocumentRoot/website and if i explicitely specifiy https they both go to the page where mail.***.com lives.

I don't care about ***.com, because this is just website and no one will try to open it with https, but i want people who type mail.***.com get to the right place and that's not DocumentRoot/website, it's just DocumentRoot - so I must find a way to force apache go https when someone types mail.***.com.

How do i do that? what do i add to my conf files?

Thank you so much.

[edited by: jdMorgan at 6:11 pm (utc) on Dec. 8, 2004]
[edit reason] Changed obscured domain to avoid forum filters [/edit]

atoyf

10:31 pm on Dec 7, 2004 (gmt 0)

10+ Year Member



wow, i guess no one ever forced SSL, am i trying to do "mission impossible" here?

I tried this link:
[webmasterworld.com...]

but it did not make any difference.

All i want is if someone requests mail.#*$!.com - i need apache make it https, how?

dari

4:53 pm on Dec 8, 2004 (gmt 0)

10+ Year Member



search [forums.gentoo.org...] ... they've dealt with this over there before.

jdMorgan

6:13 pm on Dec 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



atoyf,

Welcome to WebmasterWorld!

Maybe this thread [webmasterworld.com] will help.

Jim