仅使用嵌入式Tomcat的SonarQube 4.x - >你能用Apache为代理添加AJP支持吗?

时间:2013-11-14 14:32:44

标签: apache tomcat sonarqube ajp

据我所知,SonarQube仅支持版本4.x的嵌入式模式。我需要在apache Server后面运行服务器。因此,我需要对嵌入式Tomcat服务器的AJP支持。

您是否可以记录如何在Tomcat端启用AJP支持以及如何配置端口号。据我所知,这是通过https在Apache服务器后面运行tomcat应用程序的唯一可靠方法。

配置的变种我自己的SSL证书进入嵌入式tomcat有一些缺点

  • 我目前有超过12台运行服务器正在运行Apache服务器,而且实际上并不想配置12次服务器。
  • 我想通过标准https端口运行所有服务器以简化URL
  • 我更愿意避免设置12个Ubuntu服务器实例和12个SSL证书(或通配符证书)。

[以上评论添加以澄清评论]

由于

Marcel Baumann

2 个答案:

答案 0 :(得分:1)

目前尚不支持。随意关注并投票选择http://jira.codehaus.org/browse/SONAR-4742

答案 1 :(得分:1)

当然,你必须在apache中添加这个模块:rewrite,proxy和proxy_ajp

将此配置站点添加到您的apache(如果您的声纳/ tomcat位于另一台服务器中,请更改localhost)

<VirtualHost *:80>
    ServerName sonar.yourdomain.com
    ServerAlias sonar
    ServerAdmin your@email.com

    LogLevel warn
    ErrorLog /var/log/apache2/sonar/error.log
    CustomLog /var/log/apache2/sonar/access.log combined
    DocumentRoot /var/www/sonar/

    RewriteEngine on
    RewriteRule ^/$ /sonar/ [R]
    RewriteRule ^/sonar$ /sonar/ [R]

    ProxyPass /sonar/ ajp://localhost:8009/sonar/
    ProxyPassReverse /sonar/ ajp://localhost:8009/sonar/
</VirtualHost>

如果您想使用SSL,只需将端口80更改为443并添加模块:ssl并包含ssl证书的certificatekeyfile配置,

希望它有所帮助;)

相关问题