forcing http to go to https

Steven Stern subscribed-lists at sterndata.com
Thu Jun 24 23:02:08 UTC 2004


On Thu, 24 Jun 2004 17:49:51 +0200, Alexander Dalloz
<alexander.dalloz at uni-bielefeld.de> wrote:

>Put these lines in the /etc/httpd/conf/httpd.conf anywhere near the end.
>Don't put it inside the SSL vhost config!

Bear with me a little more.  I'm still not seeing how the loop is created. 

I need to have the rewrite to avoid http://webroot.mydomain.com/horde being
available.  

The <directory> re-write is at the very end of httpd.conf, after all virtual
servers have been defined.  I still get the too many redirects error.

Here's an abstracted version of httpd.conf.  When I uncomment that last
<directory> stanza, things go bad.

Listen 80
DocumentRoot "/var/www/html"
<Directory "/var/www/html">

    Options Indexes FollowSymLinks 
    AllowOverride None
    Order deny,allow
 </Directory>
NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
   ServerAdmin root at localhost.localdomain
   DocumentRoot /var/www/html
   ServerName ciscy
</VirtualHost>
<VirtualHost *:80>
   ServerAdmin  webmaster at foo.com
   DocumentRoot /var/www/html/sds
   ServerName steve.foo.com
</VirtualHost>
<VirtualHost *:80>
   ServerAdmin webmaster at foo.com
   DocumentRoot /var/www/html/marilyn
   ServerName marilyn.foo.com 
  </VirtualHost>
<VirtualHost *:80>
   ServerAdmin webmaster at foo.cdom
   DocumentRoot /var/www/html/gallery
   ServerName gallery.foo.com
</VirtualHost>

<Directory /var/www/html/learnphp>
# secure test scripts that may not themselves be secure or in development
  Options +Indexes
  AuthType Basic
  AuthName "PHP Development"
  AuthUserFile /etc/http-auth-users
  Require user sdstern
</Directory>

<VirtualHost *:443>
   ServerAdmin  webmaster at foo.com
   DocumentRoot /var/www/html/horde/
   Alias /horde/ /var/www/html/horde/
   ServerName webmail.foo.com
 </VirtualHost>

#<Directory /var/www/html/horde/>
#    RewriteEngine      on
#    RewriteCond        %{SERVER_PORT} !=443
#    RewriteRule         ^.* - [F]
#    ErrorDocument    403 https://webmail.foo.com/
#</Directory>




--
   Steve
   





More information about the fedora-list mailing list