我的服务器机器上有一个tomcat 6.0 Web服务器。现在我在同一台机器上创建了一个glassfish服务器。为了避免端口冲突,我只需将glassfish端口更改为8081.现在我如何从不同的DNS名称访问glassfish和tomcat上的Web应用程序。
答案 0 :(得分:1)
取决于您的DNS /服务器设置。
<VirtualHost *>
ProxyPreserveHost On
# Servers to proxy the connection, or;
# List of application servers:
# Usage:
# ProxyPass / http://[IP Addr.]:[port]/
# ProxyPassReverse / http://[IP Addr.]:[port]/
# Example:
ProxyPass / http://0.0.0.0:8081/
ProxyPassReverse / http://0.0.0.0:8081/
ServerName glassfish.server
</VirtualHost>
<VirtualHost *>
ProxyPreserveHost On
# Servers to proxy the connection, or;
# List of application servers:
# Usage:
# ProxyPass / http://[IP Addr.]:[port]/
# ProxyPassReverse / http://[IP Addr.]:[port]/
# Example:
ProxyPass / http://0.0.0.0:8080/
ProxyPassReverse / http://0.0.0.0:8080/
ServerName tomcat.server
</VirtualHost>