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 : sonar.domain.com

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

Here is my sonar.mydomain.com

server {
  listen      80;
  server_name sonar.mydomain.com;

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

  location / {
      proxy_pass http://127.0.0.1:9000;
  }
}

In my sonar.conf, I have:

sonar.jdbc.username=sonar
sonar.jdbc.password=sonar

sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance

sonar.web.host=127.0.0.1

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

# TCP port for incoming HTTP connections. Disabled when value is -1.
sonar.web.port=9000

sonar.binaries=bin/classes

Any Idea what's wrong??

share|improve this question
1  
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
1  
@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

 
discard

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

Browse other questions tagged or ask your own question.