I have a tomcat(running on 8080) application on my cent os server and i can access it with the url:
and I have my admin panel on
and I have an apache server running on port 80.
I have two domains :
I've managed to configure tomcat, mod_jk and apache server such that admin.myapp.com url opens the tomcat home page(SERVER_IP:8080).
But what I want is to make admin.myapp.com url to open SERVER_IP:8080/myapp/admin and www.myapp.com to open SERVER_IP:8080/myapp.
I need to make apache know when a request came to admin.myapp.com, it should know to redirect the request to SERVER_IP:8080/myapp/admin. Something is missing obviously.
Here are my configurations :
httpd.conf (admin.myapp.com.conf actually because it is created by plesk panel but i think it's irrevelant)
<VirtualHost SERVER_IP:80 > ServerName "admin.myapp.com:80" ServerAlias "www.admin.myapp.com" ServerAlias "ipv4.admin.myapp.co" ServerAdmin "email@example.com" UseCanonicalName Off JkMount / ajp13 JkMount /* ajp13 .... </VirtualHost>
# Load mod_jk module # Update this path to match your modules location LoadModule jk_module modules/mod_jk.so # Where to find workers.properties # Update this path to match your conf directory location JkWorkersFile /usr/local/tomcat7/conf/workers.properties # Where to put jk logs # Update this path to match your logs directory location JkLogFile /usr/local/tomcat7/logs/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel debug # Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat "%w %V %T"
# Define 1 real worker named ajp13 worker.list=ajp13 # Set properties for worker named ajp13 to use ajp13 protocol, # and run on port 8009 worker.ajp13.type=ajp13 worker.ajp13.host=localhost worker.ajp13.port=8009 worker.ajp13.lbfactor=50 worker.ajp13.cachesize=10 worker.ajp13.cache_timeout=600 worker.ajp13.socket_keepalive=1 worker.ajp13.socket_timeout=300
Thanks in advance.