2016-11-29 71 views
0

我只是配置的Apache Tomcat的java应用程序如下图所示。如何在apache web服务器中配置tomcat java应用程序?

<VirtualHost *:80> 
    ServerName domain.com 
    ProxyRequests Off 
    ProxyPreserveHost On 
    <Proxy *> 
     Order deny,allow 
     Allow from all 
    </Proxy> 
    ProxyPass/http://localhost:8080/app_name 
    ProxyPassReverse/http://localhost:8080/app_name 
</VirtualHost> 

后来我启用网站使用a2ensite adavipalem.conf并重新启动服务器。

当我尝试通过按>>domain.com 这样的浏览器访问时,我在浏览器中得到了如下所示的内容。

Internal Server Error 

    The server encountered an internal error or misconfiguration and was unable to complete your request. 

    Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error. 

More information about this error may be available in the server error log. 

Apache/2.4.7 (Ubuntu) Server at adavipalem.com Port 80 

任何人都可以帮助我,我应该在哪里改变这个配置?

Regards,

+0

中的httpd的'error.log'或Tomcat的'catalina.out'任何错误? –

回答

1

我自己解决了这个问题。有什么我刚才提到的配置没有问题..

<VirtualHost *:80> 
    ServerName domain.com 
    ProxyRequests Off 
    ProxyPreserveHost On 
    <Proxy *> 
     Order deny,allow 
     Allow from all 
    </Proxy> 
    ProxyPass/http://localhost:8080/app_name 
    ProxyPassReverse/http://localhost:8080/app_name 
</VirtualHost> 

我只是忘了启用

a2enmod proxy_http 

由于这个原因,我不能能够使HTTP请求最终我卡在apache本身。后来我启用proxy_http,现在是进行代理我到tomcat网址我可以现在能够参照tomcat的应用程序。

感谢

相关问题