Need NGINX configuration for SSL with self-signed certificate

SonarQube 8.2 with nginx reverse proxy
below is the reverse proxy settings am using

server {

listen 443;

ssl on;
ssl_certificate /etc/nginx/ssl/cert.crt;
ssl_certificate_key /etc/nginx/ssl/cert.key;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;

server_name Sonarqube;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location /{
proxy_pass http://localhost:9000;
proxy_redirect http://localhost:9000 https://localhost:9090;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $https;

      proxy_http_version 1.1;
      proxy_request_buffering off;


Am i missing some thing

Am able to browse https but when trying to compile using https with client unable to connect to sonarqube server
But am able to compile using http with port 9000

Can any one help me on this
I need correct nginx config

Below is the nginx logs

Hello @Sharath_Kumar,

Here is a SonarQube community, not an Nginx one. Looking at your Nginx config, I’m puzzled by the server_name entry as usually this is the vhost URL. But anyway I can’t really say much about this.

What’s sure is that the issue you have is your scanner not able to reach SQ. You should first try to reach it using curl and make sure it works before even running the scanner.


Thanks for replay,

I was able to solve the issue by importing the self-signed certificate into java keystore.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.