我正在使用Ubuntu14上的Apache服务器进行Tomcatcat群集。我做Tomcat集群成功并与Apache服务器集成。 在Apache服务器中,我做了虚拟主机以及下面的代码。
scope.$watch(function(){
return ctrl.$modelValue && ctrl.$modelValue.length;
}, function(){
ctrl.$validate();
});
因此,当我请求myexample.com时,它会将请求发送给balancer和balancer,进一步将此请求重定向到一个Tomcat Worker。我的worker.properties文件看起来像这样。
<VirtualHost *:80>
ServerName myexample.com
ServerAdmin webmaster@myexample.com
DocumentRoot /var/www/myexample.com/public_html/
ServerAlias www.myexample.com
JkMount / balancer
# Error page is just the index telling about the situation of not being connected
ErrorDocument 404 /index.html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
现在问题是每当我请求myexample.com时,请求都会重定向到Tomcat Root文件夹并显示Root文件夹内容。我在每个tomcat实例的webapps文件夹中都有一个Web应用程序(helloworld)。
所以我的问题是如何配置Tomcat或Apache,以便请求重定向转到helloworld而不是Root文件夹。