You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by José Euclides Silva Junior <eu...@gmail.com> on 2006/08/08 23:23:59 UTC

[users@httpd] Trying to hide application(Java + Apache) directory from browser address bar

Hi,
i intend to hide the application root directory from the browser address
bar, as you can see at these steps example:
1) Http request: www.xxxx.com
2) Apache runs some module that would redirects(or proxy) the resource to
something like www.xxxx.com/somedir/ (J2ee aplication - same server)
3) So, Apache returns the right thing but the browser's address bar must
show www.xxxx.com only, without the application directory.
Both Apache and OC4J lives at the same server(IP address)!

I ve tried to do the following:

   ServerName www-pddataprev
   DocumentRoot
/u01/app/oracle/product/oracle10g/Apache/Apache/htdocs/pddataprev

There is an index.html file in the pddataprev directory which redirects to
Java environment directory(deqs), as you can see below:

<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www-pddataprev/deqs/">
But, i got a failure because the browser shows the app directory;
http://www-pddataprev/deqs/

Is there a way to hide "deqs" from the browser address bar?

Thanks in advance, Euclides.

Re: [users@httpd] Trying to hide application(Java + Apache) directory from browser address bar

Posted by José Euclides Silva Junior <eu...@gmail.com>.
Dear Steve,
I ve already tried it, but i got a 404 error(notfound) even if i include a
jsp page reference as a Alias command parameter. This is because java
environment has their own control!
So, i tried to solve it with a redirection META TAG, but the java
directory(deqs) is still showed into the browser's address bar.
In fact, what i want is:
1) Submit: http://www-pddataprev
2) Apache sends this request to Java environment(Oracle App Server)
through ajp protocol(I guess...) ---> calling www-pddataprev/deqs(deqs is
the java app's root directory)
3) The response would hide the deqs directory from browser.
That's it!

I have tried somethings with proxypass but i havent gotten succeded yet...
Thank you!
Euclides.

2006/8/9, Steve Swift <st...@gmail.com>:
>
> If you were to add:
>
> Alias / "/u01/app/oracle/product
> /oracle10g/Apache/Apache/htdocs/pddataprev/deqs/"
>
> (all on one line) and remove your <META ...> from index.html then that
> would have the effect of fetching all documents which appeared to com from
> the root from its directory "deqs".
>
>
>
> On 08/08/06, José Euclides Silva Junior <eu...@gmail.com> wrote:
> >
> >  Hi,
> > i intend to hide the application root directory from the browser address
> > bar, as you can see at these steps example:
> > 1) Http request: www.xxxx.com
> > 2) Apache runs some module that would redirects(or proxy) the resource
> > to something like www.xxxx.com/somedir/ (J2ee aplication - same server)
> > 3) So, Apache returns the right thing but the browser's address bar must
> > show www.xxxx.com only, without the application directory.
> > Both Apache and OC4J lives at the same server(IP address)!
> >
> > I ve tried to do the following:
> >
> >    ServerName www-pddataprev
> >    DocumentRoot
> > /u01/app/oracle/product/oracle10g/Apache/Apache/htdocs/pddataprev
> >
> > There is an index.html file in the pddataprev directory which redirects
> > to Java environment directory(deqs), as you can see below:
> >
> > <META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www-pddataprev/deqs/">
> > But, i got a failure because the browser shows the app directory;
> > http://www-pddataprev/deqs/
> >
> > Is there a way to hide "deqs" from the browser address bar?
> >
> > Thanks in advance, Euclides.
> >
> >
>
>
>
> --
> Steve Swift
> http://www.swiftys.org.uk
>

Re: [users@httpd] Trying to hide application(Java + Apache) directory from browser address bar

Posted by Steve Swift <st...@gmail.com>.
If you were to add:

Alias / "/u01/app/oracle/product
/oracle10g/Apache/Apache/htdocs/pddataprev/deqs/"

(all on one line) and remove your <META ...> from index.html then that would
have the effect of fetching all documents which appeared to com from the
root from its directory "deqs".


On 08/08/06, José Euclides Silva Junior <eu...@gmail.com> wrote:
>
> Hi,
> i intend to hide the application root directory from the browser address
> bar, as you can see at these steps example:
> 1) Http request: www.xxxx.com
> 2) Apache runs some module that would redirects(or proxy) the resource to
> something like www.xxxx.com/somedir/ (J2ee aplication - same server)
> 3) So, Apache returns the right thing but the browser's address bar must
> show www.xxxx.com only, without the application directory.
> Both Apache and OC4J lives at the same server(IP address)!
>
> I ve tried to do the following:
>
>    ServerName www-pddataprev
>    DocumentRoot
> /u01/app/oracle/product/oracle10g/Apache/Apache/htdocs/pddataprev
>
> There is an index.html file in the pddataprev directory which redirects to
> Java environment directory(deqs), as you can see below:
>
> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www-pddataprev/deqs/">
> But, i got a failure because the browser shows the app directory;
> http://www-pddataprev/deqs/
>
> Is there a way to hide "deqs" from the browser address bar?
>
> Thanks in advance, Euclides.
>
>



-- 
Steve Swift
http://www.swiftys.org.uk

Re: [users@httpd] Trying to hide application(Java + Apache) directory from browser address bar

Posted by José Euclides Silva Junior <eu...@gmail.com>.
Sorry, but i have already tried it. The browser returns me : Erro de HTTP
403 - proibido
Internet Explorer
You can see the directive bellow:
ps: www-pddataprev is a DNS hostname...

<VirtualHost 10.0.134.23:7778>
   ServerName www-pddataprev
   DocumentRoot
/u01/app/oracle/product/oracle10g/Apache/Apache/htdocs/deqs_web/
   # DocumentRoot /u01/app/oracle/product/oracle10g/j2ee
# PROXY PARA O MESMO SERVIDOR
   RewriteEngine on
   RewriteRule ^(.*) http://www-pddataprev/deqs [P,L]


I guess i need more help unfortunatelly...
Thanks Fabricio.

2006/8/9, SOPRO <so...@gmail.com>:
>
> José,
>
> For example, if your OC4J are listen on port 8080, you can use
> mod_rewrite with proxy and remove your index.html with that Refresh.
>
> ie: You can use something like this:
>
> RewriteEngine On
> RewriteRule ^(.*) http://localhost:8080/deqs [P,L]
>
> Using Rewrite with [P] option, will not rewrite the address in the bar.
>
> Fabricio.
>
>
> 2006/8/8, José Euclides Silva Junior <eu...@gmail.com>:
> >
> > Hi,
> > i intend to hide the application root directory from the browser address
> > bar, as you can see at these steps example:
> > 1) Http request: www.xxxx.com
> > 2) Apache runs some module that would redirects(or proxy) the resource
> to
> > something like www.xxxx.com/somedir/ (J2ee aplication - same server)
> > 3) So, Apache returns the right thing but the browser's address bar must
> > show www.xxxx.com only, without the application directory.
> > Both Apache and OC4J lives at the same server(IP address)!
> >
> > I ve tried to do the following:
> >
> >    ServerName www-pddataprev
> >    DocumentRoot
> > /u01/app/oracle/product/oracle10g/Apache/Apache/htdocs/pddataprev
> >
> > There is an index.html file in the pddataprev directory which redirects
> to
> > Java environment directory(deqs), as you can see below:
> >
> >
> > <META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www-pddataprev/deqs/">
> > But, i got a failure because the browser shows the app directory;
> > http://www-pddataprev/deqs/
> >
> > Is there a way to hide "deqs" from the browser address bar?
> >
> > Thanks in advance, Euclides.
> >
>
> ---------------------------------------------------------------------
> 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@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Trying to hide application(Java + Apache) directory from browser address bar

Posted by SOPRO <so...@gmail.com>.
José,

 For example, if your OC4J are listen on port 8080, you can use
mod_rewrite with proxy and remove your index.html with that Refresh.

ie: You can use something like this:

 RewriteEngine On
 RewriteRule ^(.*) http://localhost:8080/deqs [P,L]

 Using Rewrite with [P] option, will not rewrite the address in the bar.

 Fabricio.


2006/8/8, José Euclides Silva Junior <eu...@gmail.com>:
>
> Hi,
> i intend to hide the application root directory from the browser address
> bar, as you can see at these steps example:
> 1) Http request: www.xxxx.com
> 2) Apache runs some module that would redirects(or proxy) the resource to
> something like www.xxxx.com/somedir/ (J2ee aplication - same server)
> 3) So, Apache returns the right thing but the browser's address bar must
> show www.xxxx.com only, without the application directory.
> Both Apache and OC4J lives at the same server(IP address)!
>
> I ve tried to do the following:
>
>    ServerName www-pddataprev
>    DocumentRoot
> /u01/app/oracle/product/oracle10g/Apache/Apache/htdocs/pddataprev
>
> There is an index.html file in the pddataprev directory which redirects to
> Java environment directory(deqs), as you can see below:
>
>
> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www-pddataprev/deqs/">
> But, i got a failure because the browser shows the app directory;
> http://www-pddataprev/deqs/
>
> Is there a way to hide "deqs" from the browser address bar?
>
> Thanks in advance, Euclides.
>

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Trying to hide application(Java + Apache) directory from browser address bar

Posted by José Euclides Silva Junior <eu...@gmail.com>.
I did it.I have found the OC4J port, then i tried 2 thinks as follow:

1) Using server's ip address:

ServerName www-pddataprev
   DocumentRoot
/u01/app/oracle/product/oracle10g/Apache/Apache/htdocs/deqs_web/
   # DocumentRoot /u01/app/oracle/product/oracle10g/j2ee
   RewriteEngine on
   RewriteRule ^(.*) http://10.0.134.23:7778/deqs [P,L]

--> *The browser's address bar returned me* "http://10.0.134.23:7778/deqs/",
with the correct web page content

2) Using loopback address:

 ServerName www-pddataprev
   DocumentRoot
/u01/app/oracle/product/oracle10g/Apache/Apache/htdocs/deqs_web/
   # DocumentRoot /u01/app/oracle/product/oracle10g/j2ee
   RewriteEngine on
   RewriteRule ^(.*) http://10.0.134.23:7778/deqs [P,L]

--> *The server returned "HTTP 301 Moved Permanently" to browser*

So, what should i try?






2006/8/9, SOPRO <st...@gmail.com>: >:
>
> José,
>
> At first, you must discover in which port your OC4J is running and
> then, what's the nome of the context of your application.
>
> Hint: Try to access the application directly one the OC4J.
>
> Fabricio.
>
> 2006/8/9, José Euclides Silva Junior <eu...@gmail.com>:
> >
> > I had tried it: the browser showed - 403 Error Forbidden
> > Any hint?
> >
> >
> > 2006/8/8, José Euclides Silva Junior <eu...@gmail.com>:
> > >
> > >
> > >
> > > Hi,
> > > i intend to hide the application root directory from the browser
> address
> > bar, as you can see at these steps example:
> > > 1) Http request: www.xxxx.com
> > > 2) Apache runs some module that would redirects(or proxy) the resource
> to
> > something like www.xxxx.com/somedir/ (J2ee aplication - same server)
> > > 3) So, Apache returns the right thing but the browser's address bar
> must
> > show www.xxxx.com only, without the application directory.
> > > Both Apache and OC4J lives at the same server(IP address)!
> > >
> > > I ve tried to do the following:
> > >
> > >    ServerName www-pddataprev
> > >    DocumentRoot
> > /u01/app/oracle/product/oracle10g/Apache/Apache/htdocs/pddataprev
> > >
> > > There is an index.html file in the pddataprev directory which
> redirects to
> > Java environment directory(deqs), as you can see below:
> > >
> > >
> > > <META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www-pddataprev/deqs/
> ">
> > > But, i got a failure because the browser shows the app directory;
> > http://www-pddataprev/deqs/
> > >
> > > Is there a way to hide "deqs" from the browser address bar?
> > >
> > > Thanks in advance, Euclides.
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> 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@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Re: Trying to hide application(Java + Apache) directory from browser address bar

Posted by SOPRO <so...@gmail.com>.
José,

 At first, you must discover in which port your OC4J is running and
then, what's the nome of the context of your application.

 Hint: Try to access the application directly one the OC4J.

 Fabricio.

2006/8/9, José Euclides Silva Junior <eu...@gmail.com>:
>
> I had tried it: the browser showed - 403 Error Forbidden
> Any hint?
>
>
> 2006/8/8, José Euclides Silva Junior <eu...@gmail.com>:
> >
> >
> >
> > Hi,
> > i intend to hide the application root directory from the browser address
> bar, as you can see at these steps example:
> > 1) Http request: www.xxxx.com
> > 2) Apache runs some module that would redirects(or proxy) the resource to
> something like www.xxxx.com/somedir/ (J2ee aplication - same server)
> > 3) So, Apache returns the right thing but the browser's address bar must
> show www.xxxx.com only, without the application directory.
> > Both Apache and OC4J lives at the same server(IP address)!
> >
> > I ve tried to do the following:
> >
> >    ServerName www-pddataprev
> >    DocumentRoot
> /u01/app/oracle/product/oracle10g/Apache/Apache/htdocs/pddataprev
> >
> > There is an index.html file in the pddataprev directory which redirects to
> Java environment directory(deqs), as you can see below:
> >
> >
> > <META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www-pddataprev/deqs/">
> > But, i got a failure because the browser shows the app directory;
> http://www-pddataprev/deqs/
> >
> > Is there a way to hide "deqs" from the browser address bar?
> >
> > Thanks in advance, Euclides.
> >
> >
>
>

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Trying to hide application(Java + Apache) directory from browser address bar

Posted by José Euclides Silva Junior <eu...@gmail.com>.
I had tried it: the browser showed - 403 Error Forbidden
Any hint?


2006/8/8, José Euclides Silva Junior <eu...@gmail.com>:
>
>  Hi,
> i intend to hide the application root directory from the browser address
> bar, as you can see at these steps example:
> 1) Http request: www.xxxx.com
> 2) Apache runs some module that would redirects(or proxy) the resource to
> something like www.xxxx.com/somedir/ (J2ee aplication - same server)
> 3) So, Apache returns the right thing but the browser's address bar must
> show www.xxxx.com only, without the application directory.
> Both Apache and OC4J lives at the same server(IP address)!
>
> I ve tried to do the following:
>
>    ServerName www-pddataprev
>    DocumentRoot
> /u01/app/oracle/product/oracle10g/Apache/Apache/htdocs/pddataprev
>
> There is an index.html file in the pddataprev directory which redirects to
> Java environment directory(deqs), as you can see below:
>
> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www-pddataprev/deqs/">
> But, i got a failure because the browser shows the app directory;
> http://www-pddataprev/deqs/
>
> Is there a way to hide "deqs" from the browser address bar?
>
> Thanks in advance, Euclides.
>
>