Search code examples
apachesonarqubereverse-proxysonarqube-ops

Restricting sonarqube access only via Apache Reverse proxy server


I have configured my Sonarqube server to be accessed using the reverse proxy mechanism provided by Apache server mod_proxy module.

My question here is, even after the above setup i will be able to access the sonarqube server by hitting the direct sonarqube url ex:http://localhost:9000.

Is there a way i can restrict the access to my sonarqube server only via Apache reverse proxy server, by making simple configuration changes may be in some sonarqube property files.

Or Any other solution for this requirement?

I am using the latest version of Sonarqube 6.1


Solution

  • Ragdu you have to bind SonarQube to localhost. In sonar.properties use : sonar.web.host=127.0.0.1

    Obviously you will be able to browse from your server by accessing http://localhost:9000 but only from your server, you won't be able to access through http://{your_server_ip}:9000.