Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Configure Apache HTTPD not to see the webapp name in the URL

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Apache 2.0 error message mod_jrun20.c wrong versi..  
Author Message
user1450

External


Since: Feb 27, 2004
Posts: 3



(Msg. 1) Posted: Sun Jun 27, 2004 9:19 am
Post subject: Configure Apache HTTPD not to see the webapp name in the URL
Archived from groups: alt>apache>configuration (more info?)

I've successfully set up JK2, Apache HTTPD and Tomcat.
My webapp it called mysite - I've set my workers.properties as
[uri:/mysite/*].
My site is called, say http://welcometomysite.com.

In order to actually make mysite/index.jsp to appear when you go to
http://welcometomysite.com, I used mod_rewrite and added a directive:

<Directory />
Options FollowSymLinks
AllowOverride AuthConfig
RewriteEngine on
RewriteRule / /midletsite/ [L]
</Directory>

However, when I go to http://welcometomysite.com, the url is
http://welcometomysite.com/mysite.

Is there any way that I can disguise the URL so it never shows the
web-app name?
One considerations is that all my entries in my struts.config and jsp
pages currently say /mysite/dosomething.do.

Essentially, I'm looking for a solution where I never see my web-app
name in my URL. Can anyone advise? I am an HTTPD newbie.

Thanks

Ben

 >> Stay informed about: Configure Apache HTTPD not to see the webapp name in the URL 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Sun Jun 27, 2004 4:59 pm
Post subject: Re: Configure Apache HTTPD not to see the webapp name in the URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Ben Jessel <ben.jessel.DeleteThis@morpheme.co.uk> wrote:
 > Essentially, I'm looking for a solution where I never see my web-app
 > name in my URL

Then use a frameset and 'run' your application in the inner frame.
Davide

--
| It is always preferable to visit home with a friend. Your parents
| will not be pleased with this plan, because they want you all to
| themselves and because in the presence of your friend, they will have
| to act like mature human beings ...<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Configure Apache HTTPD not to see the webapp name in the URL 
Back to top
Login to vote
user2520

External


Since: Oct 21, 2003
Posts: 34



(Msg. 3) Posted: Sun Jun 27, 2004 4:59 pm
Post subject: Re: Configure Apache HTTPD not to see the webapp name in the URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Davide Bianchi wrote:
 > Ben Jessel wrote:
  > > Essentially, I'm looking for a solution where I never see my web-app
  > > name in my URL
 >
 > Then use a frameset and 'run' your application in the inner frame.

or write a php interface that loads your pages dinamycally

--
Robi<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Configure Apache HTTPD not to see the webapp name in the URL 
Back to top
Login to vote
user1450

External


Since: Feb 27, 2004
Posts: 3



(Msg. 4) Posted: Mon Jun 28, 2004 9:00 am
Post subject: Re: Configure Apache HTTPD not to see the webapp name in the URL [Login to view extended thread Info.]
Archived from groups: alt>apache>configuration, others (more info?)

Thanks for everyone's input.

However, I'm a little concerned that there's not a quick and easy
apache way of doing this; what do commercial users do? I'm sure that
there must be an apache way of doing this! Could it be done with
virtual hosting or aliasing?

Its a pity that you can't just define a virtual directory to
c:/tomcat4.1/webapps/mysite, as then this circumvents JK2 and doesn't
use apache.

So is this a limitation of JK2 that you can't ever intercept something
at the root path of your webserver and then forward it to a different
context?

I tried:

[urn:/]
context=/mysite/

But unfortunately it never got picked up.



Btw as anyone successfully managed to get JNI channels working with
apache/tomcat? THe closest I got was an error message saying that it
needed some jni libraries in the java-library-path. I added a dll, but
still no joy......


Original Mesage:



I've successfully set up JK2, Apache HTTPD and Tomcat.
My webapp it called mysite - I've set my workers.properties as
[uri:/mysite/*].
My site is called, say http://welcometomysite.com.

In order to actually make mysite/index.jsp to appear when you go to
http://welcometomysite.com, I used mod_rewrite and added a directive:

<Directory />
Options FollowSymLinks
AllowOverride AuthConfig
RewriteEngine on
RewriteRule / /mysite/ [L]
</Directory>

However, when I go to http://welcometomysite.com, the url is
http://welcometomysite.com/mysite.

Is there any way that I can disguise the URL so it never shows the
web-app name?
One considerations is that all my entries in my struts.config and jsp
pages currently say /mysite/dosomething.do.

Essentially, I'm looking for a solution where I never see my web-app
name in my URL. Can anyone advise? I am an HTTPD newbie.

Thanks

Ben
 >> Stay informed about: Configure Apache HTTPD not to see the webapp name in the URL 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 5) Posted: Mon Jun 28, 2004 4:19 pm
Post subject: Re: Configure Apache HTTPD not to see the webapp name in the URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In alt.apache.configuration Ben Jessel <ben.jessel RemoveThis @morpheme.co.uk> wrote:
 > So is this a limitation of JK2 that you can't ever intercept something
 > at the root path of your webserver and then forward it to a different
 > context?

Sure you can. Just put your webapp in the ROOT context of the
application server. But then you can have ONE context only. While most
of the time what you want is to have MANY context.

Davide

--
| Academic politics is the most vicious and bitter form of politics,
| because the stakes are so low. -- Wallace Sayre
|
|<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Configure Apache HTTPD not to see the webapp name in the URL 
Back to top
Login to vote
cdsmith

External


Since: Jun 28, 2004
Posts: 1



(Msg. 6) Posted: Mon Jun 28, 2004 4:19 pm
Post subject: Re: Configure Apache HTTPD not to see the webapp name in the URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Davide Bianchi wrote:
 > Sure you can. Just put your webapp in the ROOT context of the
 > application server. But then you can have ONE context only. While most
 > of the time what you want is to have MANY context.

I don't see this at all. I see that the servlet specification is
written from the perspective of having multiple contexts, but this is
mostly an annoyance that can be worked around.

(And, of course, it's quite possible to have a root context plus several
contexts mapped to subpaths, so long as the root context doesn't use
URLs that begin with the path of the subcontext.)

--
<a style='text-decoration: underline;' href="http://www.designacourse.com" target="_blank">www.designacourse.com</a>
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Configure Apache HTTPD not to see the webapp name in the URL 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 7) Posted: Mon Jun 28, 2004 6:46 pm
Post subject: Re: Configure Apache HTTPD not to see the webapp name in the URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In alt.apache.configuration Chris Smith <cdsmith RemoveThis @twu.net> wrote:
 > (And, of course, it's quite possible to have a root context plus several
 > contexts mapped to subpaths, so long as the root context doesn't use
 > URLs that begin with the path of the subcontext.)

Hummm... wouldn't that be a mess with which-context-load-first his own
libraries? If you have specific libraries for specific context of course.

Davide


--
| The Third Law of Photography: If you did manage to get any good shots,
| they will be ruined when someone inadvertently opens the darkroom door
| and all of the dark leaks out.
|<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Configure Apache HTTPD not to see the webapp name in the URL 
Back to top
Login to vote
marcus2

External


Since: Jun 28, 2004
Posts: 1



(Msg. 8) Posted: Mon Jun 28, 2004 10:59 pm
Post subject: Re: Configure Apache HTTPD not to see the webapp name in the URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I believe the difference is setting up your rewrite engine to proxy
through instead of URL rewrite. (I believe) As a proxy the client is
not made aware of the change, which is typical of load balancing servers
and stuff, but rewriting sends a "moved" header or something. I don't
remember why I went the rewrite route, but I think the proxy set-up is a
little more involved.



There used to be some fabulous articles on the apache.org site.

Ben Jessel wrote:
 > Thanks for everyone's input.
 >
 > However, I'm a little concerned that there's not a quick and easy
 > apache way of doing this; what do commercial users do? I'm sure that
 > there must be an apache way of doing this! Could it be done with
 > virtual hosting or aliasing?
 >
 > Its a pity that you can't just define a virtual directory to
 > c:/tomcat4.1/webapps/mysite, as then this circumvents JK2 and doesn't
 > use apache.
 >
 > So is this a limitation of JK2 that you can't ever intercept something
 > at the root path of your webserver and then forward it to a different
 > context?
 >
 > I tried:
 >
 > [urn:/]
 > context=/mysite/
 >
 > But unfortunately it never got picked up.
 >
 >
 >
 > Btw as anyone successfully managed to get JNI channels working with
 > apache/tomcat? THe closest I got was an error message saying that it
 > needed some jni libraries in the java-library-path. I added a dll, but
 > still no joy......
 >
 >
 > Original Mesage:
 >
 >
 >
 > I've successfully set up JK2, Apache HTTPD and Tomcat.
 > My webapp it called mysite - I've set my workers.properties as
 > [uri:/mysite/*].
<font color=purple> > My site is called, say <a style='text-decoration: underline;' href="http://welcometomysite.com.</font" target="_blank">http://welcometomysite.com.</font</a>>
 >
 > In order to actually make mysite/index.jsp to appear when you go to
 > <a style='text-decoration: underline;' href="http://welcometomysite.com," target="_blank">http://welcometomysite.com,</a> I used mod_rewrite and added a directive:
 >
 > <Directory />
 > Options FollowSymLinks
 > AllowOverride AuthConfig
 > RewriteEngine on
 > RewriteRule / /mysite/ [L]
 > </Directory>
 >
 > However, when I go to <a style='text-decoration: underline;' href="http://welcometomysite.com," target="_blank">http://welcometomysite.com,</a> the url is
<font color=purple> > <a style='text-decoration: underline;' href="http://welcometomysite.com/mysite.</font" target="_blank">http://welcometomysite.com/mysite.</font</a>>
 >
 > Is there any way that I can disguise the URL so it never shows the
 > web-app name?
 > One considerations is that all my entries in my struts.config and jsp
 > pages currently say /mysite/dosomething.do.
 >
 > Essentially, I'm looking for a solution where I never see my web-app
 > name in my URL. Can anyone advise? I am an HTTPD newbie.
 >
 > Thanks
 >
 > Ben<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Configure Apache HTTPD not to see the webapp name in the URL 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
apache vs httpd?? - hi all, I'm using RH 8. I'm quite confused with the difference between apache and httpd. In my system I have httpd installed as an RPM but there is no apache. I have apachectl for starting and stopping the httpd. So is apache installed in my system? I'v...

Apache and httpd - I have set up "httpd" to be started by "xinetd", but unless some instances of "httpd" are already running on the Linux box, I can *not* load a web page from across the internet. Why is "xinetd" *not* starting those...

Apache & Httpd.config - Hello, I ran my Apache 2.0.48 Server on my local PC under Win98. Apache is installed as C:/Apache/Apache2/.. Perl (Active State 5.8) is installed as c:/Perl/... My HTML docs are under C:/EigeneDateien/EigeneWebs/TEST_WEB1/ I want to install PERL..

Apache & httpd.config - Hello, I ran my Apache 2.0.48 Server on my local PC under Win98. Apache is installed as C:/Apache/Apache2/.. Perl (Active State 5.8) is installed as c:/Perl/... My HTML docs are under C:/EigeneDateien/EigeneWebs/TEST_WEB1/ I want to install PERL..

How to add mod_so to Apache 1.3 httpd - It's in my /usr/local/apache/D/src/modules/standard directory. It was compiled, but do I need to compile in my /usr/local/apache directory? is there a conf file where i need to add mod_so? I'm new to compiling Apache, and don't know where to begin.
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]