Apache: Forcing SSL and Authentication

Michael Torrie torriem at chem.byu.edu
Tue Feb 13 16:21:12 MST 2007


On Tue, 2007-02-13 at 16:13 -0700, Topher Fischer wrote:
> I'm not using a vhost.  I'm just running the page at

All apache installations that run ssl use a virtual host.  It's just
that one is configured to listen on port 80 and the other is on port
443.  On FC6, this is in /etc/httpd/conf.d/ssl.conf -- I believe you'll
find the virtualhost directive in there.

> http://machine/dir/.  Can I make the necessary changes just within a
> block like this:

Actually I was mistaken.  You can put the Redirect statement anywhere in
the conf file:
Redirect 301 /directory https://host/directory

> <Directory /dir/>
> 	rewrite rules
> </Directory>

Then, inside the ssl.conf file (inside the VirtualHost block for :443),
put in something like:

<Directory /dir/>
#contents of .htaccess go here
</Directory>

Michael


> 
> I've played around with different settings, but nothing works yet.
> 
> As far as I know, vhosts work with different host names, so I couldn't
> use a vhost configuration with this setup.  Is that correct?
> 
> - --
> Topher Fischer
> GnuPG Fingerprint: 3597 1B8D C7A5 C5AF 2E19  EFF5 2FC3 BE99 D123 6674
> javert42 at cs.byu.edu
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
> 
> iD8DBQFF0kYsL8O+mdEjZnQRAvtmAJ9Uz/K+7Sp5H/NzdEd1eeY5T5bAIACeK1XQ
> aGajn//beqhHw1/mY5r9o/Y=
> =Xix9
> -----END PGP SIGNATURE-----
> 
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */
> 




More information about the PLUG mailing list