sangfroid wrote:
Then you will probably have to create 2 VirtualHost, and place your authentication in the HTTPS host.Hi John, Thank you for the reply. I also found one more way to do it ... Added the following directive in httpd.conf <Location /private> RewriteEngine On ReWriteCond %{HTTPS} !=on RewriteRule .* https://%{HTTP_HOST}:443%{REQUEST_URI} [QSA,R=permanent,L] </Location> However, now the problem is, I also needed the users to authenticate by htaccess file. But keeping .htaccess file in /var/www/html/private is not working. I mean in that case, first the system asks password in an unsecured mechanism and then only https redirection is working. I wanted just the reverse...first establish secure connection and then only ask the user for password...Any clue on it ??
Listen *:80 Listen *:443 ... <VirtualHost *:80> your HTTP host config </VirtualHost> <VirtualHost *:443> your HTTPS host config <Location /> AuthType Basic AuthName private ... </Location> </VirtualHost> --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx