Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change port of SonarQube to 80

I've been trying to change the port of SonarQube from 9000 to 80. What I did was uncomment sonar.web.port and set it to 80 in the /opt/sonar/conf/sonar.properties file, and then:

sudo update-rc.d sonar defaults
sudo /etc/init.d/sonar restart

But when I try to hit the URL, nothing shows up (no answer from the server). If I revert my changes and execute the two previous commands again, SonarQube doesn't come back. I have to reboot the machine.

I'm running the latest version of Ubuntu and of SonarQube. The database is on SQL Azure. Everything works on port 9000.

My knowledge of SonarQube is limited so it's most likely I'm doing something wrong but can't figure out what.

like image 910
baywet Avatar asked Dec 14 '15 04:12

baywet


1 Answers

On Linux the port below 1024 can only be bind by root user. Your SonarQube must be runned with a normal user account.

The usual solution for this is to use nginx or apache to proxy from port 80 to 9000.

like image 109
loopingz Avatar answered Oct 21 '22 02:10

loopingz