Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a newbie with nginx.

I installed sonar ( installed in : /opt/sonar/sonarqube-5.2/ )

And I want to acess it throught :

I am not able to access it,I get a 502 bad gateway error.

Here is my

server {
  listen      80;

  index       index.php;
  root        /opt/sonar/sonarqube-5.2/;

  location / {

In my sonar.conf, I have:



# Web context. When set, it must start with forward slash (for example /sonarqube).
# The default value is root context (empty value).

# TCP port for incoming HTTP connections. Disabled when value is -1.


Any Idea what's wrong??

share|improve this question
Are you sure your sonar service is started? – Richard Smith Dec 7 '15 at 18:04
I started it, but still have 502 error – Juliatzin del Toro Dec 7 '15 at 18:07
@JuliatzindelToro, check the output of netstat -tulnp | grep :9000, to see if sonar is really running – bangal Dec 7 '15 at 18:37
Perhaps removing sonar.web.context so it's root context? – h0tw1r3 Dec 7 '15 at 18:40
Ok, it was not running because I didn't start it with sudo. now working ! Awesome, please put your comment as answer! – Juliatzin del Toro Dec 7 '15 at 18:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.