how do i redirect web trafic from port 80 to 443

Bevan C. Bennett bevan at fulcrummicro.com
Tue Jan 6 02:33:10 UTC 2004


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 
seem to remember that the default httpd.conf does that) and does it have 
the same DocumentRoot and access permissions?

I don't have a webserver running on Fedora at the moment, but my 
apache's httpd.conf (mostly default) looks something like this (note the 
repeated DocumentRoot entries and the Redirect to force SSL on the 
supprt/utils diretory):

<VirtualHost _default_:443>

DocumentRoot "/usr/add/www/html-new"
ServerName internal.avlsi.com
ServerAlias internal www www.internal.avlsi.com
ServerAdmin root at internal.avlsi.com
ErrorLog /var/log/httpd/error_log
TransferLog /var/log/httpd/access_log

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>

SetEnvIf User-Agent ".*MSIE.*" \
          nokeepalive ssl-unclean-shutdown \
          downgrade-1.0 force-response-1.0

CustomLog /var/log/httpd/ssl_request_log \
           "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>

<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>





More information about the fedora-list mailing list