logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: Authentication when using mod_jk
Author
jnsunkersett



Joined: 30 Jan 2011
Posts: 23

PostPosted: Thu 29 Sep '11 13:09    Post subject: Authentication when using mod_jk Reply with quote

Hi,

I use Apache and Tomcat together, linked via mod_jk

I have an application in Tomcat and some other applications (PHP) directly under apache\htdocs

So to have both working, I used no-jk

So I have;
Code:

<VirtualHost>

JkMount /* loadbalancer
   SetEnvIf Request_URI "/test.pl" no-jk
   SetEnvIf Request_URI "/awstats*" no-jk
   SetEnvIf Request_URI "/deployments*" no-jk

</VirtualHost>


HOW can i enable authentication for my apps ?

For those under apache\htdocs I guess .htaccess can be used. (I am learning how to)

but what can be done for the applications server by the 'loadbalancer' or mod_jk ie Tomcat ?

How can those be secured ?

thank you
jeevan
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 30 Sep '11 10:50    Post subject: Reply with quote

You can put authentication in a <Location> container within the vhost(s).
Back to top
jnsunkersett



Joined: 30 Jan 2011
Posts: 23

PostPosted: Wed 28 Dec '11 6:22    Post subject: Reply with quote

James,

If I use a <Location> element inside <VirtualHost>, for every change I will have to restart Apache.

but this limitation is not so for a .htaccess file.
(changes in .htaccess are effective immediately ... apache does not have to bounced)

Can you suggest something else ?

thanks
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 28 Dec '11 20:00    Post subject: Reply with quote

Than use FileMatch inside your .htaccess and do the auth only for your .php files. See http://httpd.apache.org/docs/2.2/de/mod/core.html#filesmatch
Back to top


Reply to topic   Topic: Authentication when using mod_jk View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules