Author |
|
gdosaigues
Joined: 25 Jun 2015 Posts: 2
|
Posted: Thu 25 Jun '15 10:01 Post subject: Redirecting to multiple webapps in same Tomcat |
|
|
I must say that I tried a lot of possibilities but my knowledgment in Apache WS is not too much advanced.
Apache Web Server version: 2.2.22
OS: Centos 6 64 bits
Tomcat version: 7.0.57
What I need to achieve is the following:
I have some plain websites defined this way:
<VirtualHost *:80>
ServerAdmin example1@example1.com
DocumentRoot "/opt/sites/example1/"
ServerName example1.com
ErrorLog logs/example1-error_log
CustomLog logs/example1-access_log common
RedirectMatch permanent ^/(.*) http://www.example1.com/$1
</VirtualHost>
<VirtualHost *:80>
ServerAdmin example1@example1.com
DocumentRoot "/opt/sites/example1/"
ServerName www.example1.com
ErrorLog logs/example1-error_log
CustomLog logs/example1-access_log common
</VirtualHost>
I have a tomcat with several webapps, each one accessible by its own context.
I must access each one of this webapps from a different domain. For example, I have the following webapps: wbExample1, wbExample2, wbExample3
It should be accessible this way:
www.example1.com/wbExample1
www.example2.com/wbExample2
www.example3.com/wbExample3
So, the domain defined for each website must also access to an specific webapp.
For an extra, I would like to know if www.example1.com/wbExample1 could be accessible with url www.example1.com/contact without showing the name context of the webapp and showing the text contact or contact.html.
I think I explained it quite clear. If you need some more information please, don't hesitate to ask me.
Thank you very much for your time. |
|
Back to top |
|
admin Site Admin
Joined: 15 Oct 2005 Posts: 692
|
Posted: Fri 26 Jun '15 11:37 Post subject: |
|
|
Already answered at the Apache user list.
Last edited by admin on Fri 26 Jun '15 11:59; edited 2 times in total |
|
Back to top |
|
gdosaigues
Joined: 25 Jun 2015 Posts: 2
|
Posted: Fri 26 Jun '15 11:41 Post subject: |
|
|
What's answered in the Apache user list is not enough. As you can see I replied to Serge telling him that I know what to use, but what I need is somebody that can explain it to me with an example. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 26 Jun '15 17:03 Post subject: |
|
|
I and most forum users do not follow the user list...
can you post the answer in pastebin?
What question is left? |
|
Back to top |
|
admin Site Admin
Joined: 15 Oct 2005 Posts: 692
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Mon 29 Jun '15 11:36 Post subject: |
|
|
Of cause you need 3 vhosts
inside a vhost it can be like
Code: |
<Location />
ProxyPass ajp://localhost:8009/
ProxyPassReverse ajp://localhost:8009/
</Location>
|
|
|
Back to top |
|