Re: HTTPS only for login page (when apache front tomcat)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 21, 2010 at 11:38 AM, chamila piyasena <tchamila@xxxxxxxxx> wrote:
>
> Hi,
> My application is running on tomcat. And I have fronted tomcat by Apache web
> server using mod_jk. And I have successfully added https in apache to all
> the pages in my application. But I want to https only for the login page. I
> have tried several configurations but unable to do so. can any one help me
> on this please?
>
> Thank you.
>
> Chamila
>

You should have separate apache vhosts for the http and https configurations.

On the http vhost, add a <LocationMatch> block, with the LocationMatch
matching your login URIs
To the <LocationMatch> block, add a RewriteRule that forces a redirect
to the https vhost.
On the https vhost, add a <LocationMatch> block, with the
LocationMatch matching all non login URIs.
To the <LocationMatch> block, add a RewriteRule that forces a redirect
to the http vhost.

Cheers

Tom

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


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux