3
I have the following structure on my server.
- Apache HTTPD (port 80)
- Tomcat (gate 8080)
I used the mod_jk
to make the connection between apache and Tomcat and this is working perfectly.
I created a subdomain to point to an application that is in Tomcat. And I made the following Virtualhost configuration.
<VirtualHost *:80>
ServerName www.cardapio.dreamt.com.br
ServerAlias cardapio.dreamt.com.br
JkMount /cardapio/* worker1
RewriteEngine On
RewriteRule ^/(.*) /cardapio/$1 [L,PT]
</VirtualHost>
But ,and I ran into two problems:
- When accessing cardapio.dreamt.com.br/dreamtech/ (with the bar at the end) the application runs without any problem. And by accessing cardapio.dreamt.com.br/dreamtech (without the end bar) I am redirected to an invalid URL cardapio.dreamt.com.br/cardapio/dreamtech/.
- When accessing menu.dreamt.com.br/ my application does not work because it is trying to get the JS and CSS of cardapio.dreamt.com.br/cardapio/xxx.js (for example). And I can’t change because these Imports are done automatically by JSF.
How to solve these problems?
Even with that change, it didn’t work. Without the bar I was redirecting to http://cardapio.dreamt.com.br/cardapio//cardapio//cardapio//cardapio//cardapio//cardapio//cardapio//cardapio//cardapio//cardapio///dreamtech/
– Guilherme Tonioli
@gtonioli I reworked the answer. Please do a test again.
– utluiz
It didn’t work utluiz. I’ll do some on the sites you indicated.
– Guilherme Tonioli