[英]issues with setting up proxy between apache server and tomcat
我一直在嘗試設置Web代理以重定向到位於以下位置的tomcat應用程序
http://example.com:8085/app 。 但是我無法使其正常工作。
<VirtualHost XXX.XXX.XXX.XX:80>
ServerName example.com
ServerAlias www.example.com
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /app http://localhost:8085/app
ProxyPassReverse /app http://localhost:8085/app
#ProxyPass / ajp://localhost:8085/ (tried this as well)
#ProxyPassReverse / ajp://localhost:8085/ (tried this as well)
<Location />
Order allow,deny
Allow from all
</Location>
#DocumentRoot /home/groupname/public_html (apache location - dummy)
DocumentRoot /usr/local/tomcat/apache-tomcat-6.0.33/webapps/app (tomcat location)
</VirtualHost>
以下是server.xml文件中的配置。
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Connector port="8085" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
現在這就是我想要做的。 當我輸入www.example.com或example.com時,我想轉到該應用程序。 有人可以指出我做錯了什么嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.