infinitiguy Posted January 2, 2009 Share Posted January 2, 2009 Hey all, Here's what I'm trying to achieve. I have a tomcat application deployed on another server and have configured apache to proxy to it using mod_jk. Works great. So, if I go to http://huskar/ apache reads through, does some rewrites and sends me to http://huskar/clearspace/index.jspa (which is actually http://luna:8080/clearspace/index.jspa) Now, I want apache to do some simple authentication. I downloaded and loaded mod_auth, created a htpasswd file, and put in the following configuration.. (ignore, or pay attention to, the commented stuff... I was trying a bunch of different things). I read online that location should be used when you're protecting a url and not a actual filesystem on the apache host.. Once this is enabled, it does prompt me to login, and I login, but then it forwards me to a blank page(the redirect works), so I end up at http://huskar/clearspace/index.jspa, but it seems like it stops responding. However, if I do... http://huskar/clearspace/admin (the admin page) it authenticates me(if I close my browser) and redirects me fine... which is really bizarre. If I disable authentication, both work. Below is my location statements, as well as the redirects I have in place.. Any help is most appreciated. <Location /clearspace/> Options FollowSymLinks AllowOverride None # AllowOverride FileInfo Indexes AuthConfig # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec AuthName "restricted stuff" AuthType Basic AuthUserFile /usr/local/apache/2.0.63/conf/htpasswd require valid-user # <Limit GET POST OPTIONS PROPFIND> # Order allow,deny # Allow from all # </Limit> # <LimitExcept GET POST OPTIONS PROPFIND> # Order deny,allow # Deny from all # </LimitExcept> </Location> RewriteEngine On # Redirect to correct hostname RewriteCond %{HTTP_HOST} !huskar\.bedford\.progress\.com RewriteRule ^(.*)$ http://huskar.bedford.progress.com$1 # Load ClearSpace by default RewriteRule ^/$ /clearspace/index.jspa [R=301,L] and for fun... my jk statements. JkWorkersFile "/usr/local/apache/2.0.63/conf/workers.properties" JkLogFile "/var/logs/www/mod_jk.log" JkLogLevel info JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat "%w %V %T" JkMount /examples/* worker1 - testing JkMount /manager/* worker2 - testing JkMount /clearspace/* worker3 Quote Link to comment https://forums.phpfreaks.com/topic/139217-apache-tomcat-proxy-with-authentication-issues/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.