I have the following vhost.
Code:
<VirtualHost *:443>
ServerName site.mydomain.com
DocumentRoot "/websites/site.mydomain.com"
SSLEngine On
SSLCipherSuite ALL
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
<Directory />
Options Indexes FollowSymLinks Indexes MultiViews ExecCGI Includes
IndexOptions FancyIndexing FoldersFirst NameWidth=*
HeaderName header.html
IndexIgnore header.html
allow from all
AuthName "Access Authentication"
AuthUserFile /etc/apache2/usenet.pwd
AuthType Basic
Require valid-user
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName site.mydomain.com
DocumentRoot "/websites/site.mydomain.com"
<Directory />
Options Indexes FollowSymLinks Indexes MultiViews ExecCGI Includes
IndexOptions FancyIndexing FoldersFirst NameWidth=*
HeaderName header.html
IndexIgnore header.html
Order deny,allow
Deny from all
allow from 192.168.0.0/255.255.255.0
</Directory>
</VirtualHost>
I am wanting to accomplish the following access to it.
1) If
http://site.mydomain.com from internal network, allow
2) If
http://site.mydomain.com from external network, forward to https (for SSL and authentication)
What directive should I put in the *:80 site configuration to do this, without breaking internal http access.
(Various services internally will not operate on https)