OHS 11g R2 - How to restrict access only to Intranet users

Posted by Pavan on Server Fault See other posts from Server Fault or by Pavan
Published on 2012-12-10T10:48:29Z Indexed on 2012/12/10 11:09 UTC
Read the original article Hit count: 285

Filed under:

For one of the sub-paths, I am trying to restrict access only to Intranet originated requests. I tried following configuration, but it's not working as expected.

<VirtualHost *:7777>

Debug ON
RewriteEngine On
RewriteOptions inherit

RewriteRule   ^/$ /test1  [R,L]
RewriteRule   ^/test2$ -  [R=404] [L]

RewriteRule   ^/stage$ /stage/test1  [R,L]
RewriteRule   ^/stage/test2$ -  [R=404] [L]

<IfModule weblogic_module>
   WebLogicCluster localhost:7003,localhost:7005
</IfModule>

<Location /test1>
    SetHandler weblogic-handler
</Location>

<Location /test2>
    SetHandler weblogic-handler
</Location>

<Location /api>
    SetHandler weblogic-handler
    PathPrepend /test1
</Location>

<Directory /stage/test1>
    Order  deny,allow
    deny from all
    Allow from 192.168
    Allow from 127
</Directory>

<Directory /stage/test2>
    Order  deny,allow
    deny from all
    Allow from 192.168
    Allow from 127
</Directory>

<Directory /stage/api>
    Order  deny,allow
    deny from all
    Allow from 192.168
    Allow from 127
</Directory>

<Location /stage/test1>
    SetHandler weblogic-handler
    WebLogicCluster localhost:7203,localhost:7205
    PathTrim /stage
</Location>

<Location /stage/test2>
    SetHandler weblogic-handler
    WebLogicCluster localhost:7203,localhost:7205
    PathTrim /stage
</Location>

<Location /stage/api>
    SetHandler weblogic-handler
    WebLogicCluster localhost:7203,localhost:7205
    PathTrim /stage
    PathPrepend /test1
</Location>

</VirtualHost>

Can someone please help me resolving this?

© Server Fault or respective owner

Related posts about apache2