This section helps you configure SonarQube if you want to run it behind a proxy. This can be done for security concerns or to consolidate multiple disparate applications.
Running SonarQube behind an Apache Proxy
We assume that you've already installed Apache 2 with module mod_proxy, that SonarQube is running and available on http://privates_sonar_host:sonar_port/ and that you want to configure a Virtual Host for www.public_sonar.com.
If the URL of the SonarQube server must have a context like http://www.public_sonar.com/sonar_context, in that case the following line must be uncommented in the sonar.properties configuration file to prevent using the Apache mod_rewrite:
And of course, the definition of the Apache virtual server must also be slightly updated :
Apache configuration is going to vary based on your own application's requirements and the way you intend to expose SonarQube to the outside world. If you need more details about Apache HTTPd and mod_proxy, please see http://httpd.apache.org.
Running SonarQube behind Nginx
At this point, edit the Nginx configuration file. Include the following to expose SonarQube at http://www.somecompany.com/:
Nginx configuration is going to vary based on your own application's requirements and the way you intend to expose SonarQube to the outside world. If you need more details about Nginx, please see http://nginx.org.
Advanced SSL properties and AJP are supported. See SONARQUBE_HOME/conf/sonar.properties for the related properties and their descriptions.
Note that these features were contributed by the SonarQube Community, and are not supported under any SonarSource Edition.