how do i redirect web trafic from port 80 to 443

Alexander Dalloz alexander.dalloz at uni-bielefeld.de
Tue Jan 6 03:25:32 UTC 2004


Am Di, den 06.01.2004 schrieb Ow Mun Heng um 03:49:
> > -----Original Message-----
> > From: Bevan C. Bennett [mailto:bevan at fulcrummicro.com]
> > Sent: Tuesday, January 06, 2004 10:33 AM
> > To: fedora-list at redhat.com
> > Subject: Re: how do i redirect web trafic from port 80 to 443
> > 
> > 
> > Ow Mun Heng wrote:
> > 
> > > Http is working fine..
> > 
> > Have you changed the DocumentRoot from the default?
> > If so, do you have a separate virtualhost configured for the 
> > SSL port (I 
> 
> Nope still at default /var/www/html
> 
> > 
> > <VirtualHost _default_:443>
> > 
> > SSLEngine on
> > 
> > SSLCipherSuite 
> > ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
> > 
> > SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
> > 
> > SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
> > 
> > <Files ~ "\.(cgi|shtml|phtml|php?)$">
> >      SSLOptions +StdEnvVars
> > </Files>
> > <Directory "/usr/add/www/cgi-bin">
> >      SSLOptions +StdEnvVars
> > </Directory>
> > 
> > <VirtualHost *>
> >      DocumentRoot /usr/add/www/html
> >      ServerName internal.avlsi.com
> >      ServerAlias internal www www.internal.avlsi.com
> >      Redirect /support/utils/ https://internal/support/utils/
> > </VirtualHost>
> 
> 
> I have mod_ssl installed but httpd.conf does not seem to have 
> loadmodule for mod_ssl
> 
> in fact searching through httpd.conf found no occurence of the word ssl or
> SSL.
> My Httpd.conf snippet
> 
> #
> # Virtual hosts
> #
> 
> <VirtualHost my_ip-address>

>From this line above I suspect you use name based virtual hosts, right?
Then put a line before the <VirtualHost IP> line:

NameVirtualHost IP_OF_VIRTHOST

>  	DocumentRoot /var/www/html 

This is the default DocumentRoot for the main server. Why do you
configure this again as a virtual host?

> 	<Directory "/">
> 	 	AllowOverride none
>  	</Directory> 
> 	
> 	<Directory "/var/www/html/">
> 	 	AllowOverride none
>  	</Directory> 
> 	
> 	<Directory "/var/www/html/path_to_my_acid_directory/">
> #		RewriteEngine	on
> #		RewriteCond		%{SERVER_PORT} !^443$
> #		RewriteRule		^(.*) https://%{SERVER_NAME}/$1
> [L,R,NC]
> 		AuthType Basic
> 		AuthName "xxxxx"
> 		AuthUserFile /var/www/htpassword/xxx
> 	    Require user xxx	
> 	</Directory>
>  	
>  	LogLevel debug
>  	
> </VirtualHost>

Did you really read the documentation on handling virtual hosts with
Apache and how to treat SSL vhosts?
http://httpd.apache.org/docs-2.0/vhosts/
http://httpd.apache.org/docs-2.0/ssl/

Alexander


-- 
Alexander Dalloz | Enger, Germany
PGP key valid: made 13.07.1999
PGP fingerprint: 2307 88FD 2D41 038E 7416  14CD E197 6E88 ED69 5653





More information about the fedora-list mailing list