Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info

Official SonarQube Doc Link: Securing the Server Behind a Proxy


This section helps you configure the SonarQube Server if you want to run it behind a proxy. This can be done for security concerns or to consolidate multiple disparate applications이 섹션은 Proxy 뒤에서 SonarQube 서버를 운영하기 위한 설정을 가이드합니다. 보안상의 이유 혹은 복수의 분리된 어플리케이션을 함께 사용하기 위해 본 섹션에 가이드 된 내용의 설정이 필요할 수 있습니다.

borderColor
Info
titleTable of Contents

Table of Contents
maxLevel3
indent16px

Panel

#888888
borderStylesolid

Table of Contents
maxLevel3
indent16px


서버설정

SonarQube 서버를 HTTPS 프로토콜상에서실행하기위해서는표준적인리버스프록시인프라스트럭처를만들어야합니다. 리버스프록시는모든 HTTP 요청헤더에서  \"X\_FORWAREDED\_PROTO: https:\"설정되어야합니다. 속성이없는경우, SonarQube에서보내는리다이렉션은 HTTP떨어집니다.

아파치프록시사용하기

다음의상황을가정합니다:

 - 여러분이이미
  • Apache 2 module mode_proxy설치완료
 -
  • SonarQube
서버가\\\ -

www.public\_sonar.com virtual host HTTPd 환경설정파일을수정합니다. 다음내용을포함시켜 SonarQube mod\_proxy통해 http://www.public\_sonar.com/접근할있도록합니다:

Code Block

````

 ProxyRequests Off

 ProxyPreserveHost On

 <VirtualHost *:80>

   ServerName
languagebash
ProxyRequests Off
ProxyPreserveHost On
<VirtualHost *:80>
  ServerName www.public_sonar.com
  

  ServerAdmin admin@somecompany.com
  

  ProxyPass / http://private_sonar_host:sonar_port/
  

  ProxyPassReverse / http://www.public_sonar.com/
  

  ErrorLog logs/somecompany/sonar/error.log
  

  CustomLog logs/somecompany/sonar/access.log common
 <

</VirtualHost>

````


Apahce 환경 설정은 여러분이 사용하는 어플리케이션의 요구사항과,

SonarQube

SonarQube를 외부로 노출시키기 원하는 방법에 따라 달라질 수 있습니다. Apache

HTTPd

HTTPd와 mod

\

_

proxy

proxy에 대한 세부적인

내용은[http://httpd.apache.org](

내용은 http://httpd.apache.org

)

를 참조합니다.

Nginx 사용하기

다음의상황을가정합니다:

Nginx 환경파일을수정합니다. http://www.somecompany.com/통해 SonarQube접근하기위해다음내용을추가합니다.

````
Code Block
languagebash
 
# the server directive is nginx's virtual host directive

 server {

   # port to listen on. Can also be set to an IP:PORT

   listen 80;

 

   # sets the

server {
  # port to listen on. Can also be set to an IP:PORT
  listen 80;

  # sets the domain[s] that this vhost server requests for
  

  server_name www.somecompany.com;

 

   location / {

    


  location / {
    proxy_pass http://sonarhost:sonarport;

   }

 }

````

  }
}


(

Nginx 환경설정은여러분의어플리케이션요구사항, SonarQube외부로노출시키기원하는방법에따라달라질있습니다. Nginx관련된세부적인내용은 

[https://www.nginx.com/resources/admin-guide/reverse-proxy/]

내용은 https://www.nginx.com/resources/admin-guide/reverse-proxy/

)

참조합니다.

SonarqubeSonarqube는 2048이상의 URL요청하는경우가있으므로 max URL length증가해야수도length를 늘려야 할 수 있습니다.

 IIS

IIS 사용하기

다음링크를참조합니다: [http://blog.jessehouwing.nl/2016/02/configure-ssl-for-sonarqube-on-windows.html](http://blog.jessehouwing.nl/2016/02/configure-ssl-for-sonarqube-on-windows.html)를 참조합니다.