1

I am running the Apache HTTP Server and JBoss Server in the same host.I am redirecting the request from Apache HTTP Server to Jboss. Now I want to authenticate the request in the Apache server.(It will be used for SSO in the future.)

Please mention if there are any changes/additional steps that needs to be done while redirecting.

Please find the changes made in the httpd.conf file.

<VirtualHost "IP":443>  
        # Proxy Settings 
        ProxyRequests Off
        ProxyPreserveHost On

        # AJP support
        ProxyPass / ajp://localhost:8009/
        ProxyPassReverse / ajp://localhost:8009/
        ErrorDocument 503 /test.html
        RedirectMatch 301 ^/WebApp/(.*)$ /$1
        RedirectMatch 301 ^/WebApp$ / 

        <Location "IP":443>
           Options FollowSymLinks
           AuthBasicAuthoritative On   
           AuthType Basic
           AuthName "Restricted Files"
           AuthBasicProvider file
           AuthUserFile "File Path"
           Require user TestUser
           AllowOverride AuthConfig
           Order allow,deny
           Allow from all
        </Location>

</VirtualHost>

<VirtualHost "IP":80>
        Redirect / https://"IP"
        #ProxyPass / ajp://localhost:8009/
        #ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>

Please help me out with this.

1 Answer 1

1

Location does not take ip and port, just virtual paths from documentroot. Also it seems that Allow from all and basic auth in the same place do not make much sense either.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks for your advice. I need to authenticate and redirect a request. I was successful in redirecting. But I was not able to authenticate. Please direct me with the changes I need to do in the above snippet. Thanks Again..
I already told you everything you need. Re-read and ask whatever you don't understand.
I made changes in the above snippet and it's working fine now..Thanks....
@Sibi Fantastic, please don't forget mark the question as answered so it does not keep showing up on the list of unresolved questions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.