Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Using name based virtual hosts with Apache2.2 and tomcat 6 |
|
Author |
|
nannuz
Joined: 10 Feb 2010 Posts: 3
|
Posted: Wed 10 Feb '10 7:41 Post subject: Using name based virtual hosts with Apache2.2 and tomcat 6 |
|
|
i am using tomact 6 ( winXP, eng) to host my java development. This development support 2 languages and is hosted on independent machine. The java development is working fine when accessed by using http://host:8080/example
now i am using Apache2.2 (WinXP, french) with name based virtual host configuration to allow access on internet . the access worked but multilingual pages are not working !! I am able to see deafult language pages ( french) only , even if i navigate to english menu of website , it return to french language pages as soon i access any submenus in website.
the reason to use virtual hosts is to get desired URL http://example.com
i tried using mod_jk, it worked well but ihave undesired URL as http://example.com/example
any tips on this please ? My vhost config is as follows
NameVirtualHost *
<VirtualHost *>
ServerName www.example.com
ProxyRequests On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
ProxyPass / http://192.168.1.1:8080/example/
ProxyPassReverse / http://192.168.1.1:8080/example/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost> |
|
Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7407 Location: EU, Germany, Next to Hamburg
|
Posted: Wed 10 Feb '10 16:00 Post subject: |
|
|
You can just change two lines to do that
Code: |
ProxyPass /example/ http://192.168.1.1:8080/example/
ProxyPassReverse /example/ http://192.168.1.1:8080/example/
|
|
|
Back to top |
|
nannuz
Joined: 10 Feb 2010 Posts: 3
|
Posted: Thu 11 Feb '10 8:10 Post subject: |
|
|
James Blond wrote: | You can just change two lines to do that
Code: |
ProxyPass /example/ http://192.168.1.1:8080/example/
ProxyPassReverse /example/ http://192.168.1.1:8080/example/
|
|
I tried the suggested changes , but instead of showing my example homepage .. it is showing Apache deafult page ( It works !!) .. any further tips to handle this problem ? |
|
Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7407 Location: EU, Germany, Next to Hamburg
|
Posted: Thu 11 Feb '10 12:51 Post subject: |
|
|
Whoops sorry. I didn't get it
working for me is
Code: |
<VirtualHost *:80>
ServerName www.example.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://192.168.1.1:8080/example/
ProxyPassReverse / http://192.168.1.1:8080/example/
#<Location />
#Order allow,deny
#Allow from all
#</Location>
</VirtualHost>
|
|
|
Back to top |
|
nannuz
Joined: 10 Feb 2010 Posts: 3
|
Posted: Tue 23 Feb '10 13:33 Post subject: |
|
|
i have modified httpd config as suggested above , but problem still exists and is not resolved. |
|
Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7407 Location: EU, Germany, Next to Hamburg
|
Posted: Tue 23 Feb '10 14:45 Post subject: |
|
|
What is in your log files about that? |
|
Back to top |
|
|
|
|
|
|