1

我只是通过在 /etc/httpd/conf/httpd.conf 上添加这个来在端口 80 上设置 tomcat

<VirtualHost *:80>
    ServerAdmin tomcat@something.com
    ServerName something.com
    ServerAlias www.something.com


    ProxyRequests Off 
    ProxyPreserveHost On 
    <Proxy *> 
       Order allow,deny 
       Allow from all 
    </Proxy> 
 ProxyPass / http://something.com:8080/ 
 ProxyPassReverse / http://something.com:8080/ 

 ErrorLog logs/something.com-error_log 
 CustomLog logs/something.com-access_log common 

</VirtualHost>

但现在我正在尝试访问 something.com/phpMyadmin

它正在重定向到 something.com:8080/something.com

这是一条错误的道路

请帮忙

4

1 回答 1

2

Try adding this line right before your existing ProxyPass:

ProxyPass /phpMyadmin !

It tells Apache not to proxy this path to Tomcat. Everything else will be proxied.

于 2013-09-01T07:23:04.540 回答