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: Apache Name Base Virtual Host config issue, JBoss |
|
Author |
|
jboyle5446
Joined: 26 Nov 2013 Posts: 1 Location: Canada
|
Posted: Tue 26 Nov '13 21:16 Post subject: Apache Name Base Virtual Host config issue, JBoss |
|
|
I have recently started working with Apache and have run into a issue that I am hoping someone can help me out with.I installed Apache on Windows with JBoss as the application server. The server will be hosting two different applications on two seperate JBoss instances and Apache is to forward the request to either application depending on the URL.
I have setup named base virtual hosts and I am attempting to use a rewrite rule to direct the incoming requests accordingly.
What I would like to happen is if the user enters url> http://hostname1.net/ they are directed to App1. If they enter url http://hostname2.net/ they are directed to App2.
Currently if I provide the full url to either application it works, for example> http://hostname1.net/appl/index.html takes me to application 1.
What doesn't work is if I enter url> http://hostname1.net/ then I am directed to the JBoss Management console instead of the Application1 page.
Below are my conf files, at this point I am trying to get to the one virtual host working before I added the additional Vhost.
Mod-JK.conf
LoadModule jk_module modules/mod_jk.so
JkWorkersFile /APPS/Apache/Apache2/conf/workers.properties
JkLogFile /APPS/Apache/Apache2/logs/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMountFile conf/uriworkermap.properties
NameVirtualHost *:80
<VirtualHost *80>
ServerName hostname1.net
ServerAlias hostname1.net
JkMount /app1/* worker1
JkMount /* worker1
DocumentRoot /APPS/jboss-4.2.3.GA-1.1/server/default/deploy
<Directory "D:/APPS/jboss-4.2.3.GA-1.1/server/default/deploy">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>
# Add jkstatus for managing runtime data
<Location /jkstatus/>
JkMount status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
uriworker.properties
/app1/*=worker1
/*=worker1
rewrite.conf
LoadModule rewrite_module modules/mod_rewrite.so
ReWriteEngine On
RewriteRule ^/$ /app1/index.html
workers.properties
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8109
Any suggestions on I could this working as expected would be grealy appreciated. Many thanks in advance. |
|
Back to top |
|
|
|
|
|
|