이 문서는 SonarQube v6.4 기반의 문서로 아카이브 되었습니다.
최신 문서를 참조하십시오.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Next »

Official SonarQube Doc Link: Securing the Server Behind a Proxy


Confluence URL:

[https://docs.sonarqube.org/display/SONAR/Securing+the+Server+Behind+a+Proxy](https://docs.sonarqube.org/display/SONAR/Securing+the+Server+Behind+a+Proxy)



## 서버 설정


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


## 아파치 프록시 사용하기


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


 - 여러분이 이미 Apache 2 module mode_proxy 설치 완료

 - SonarQube 서버가 http://private\_sonar\_host:sonar\_port/ 에서 실행

 - www.public_sonar.com virtual host 설정 완료


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


````

 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 외부로 노출시키기 원하는 방법에 따라 달라질 있습니다. Apache HTTPd mod\_proxy 대한 세부적인 내용은 [http://httpd.apache.org](http://httpd.apache.org) 참조합니다.


## Nginx 사용하기


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


- Nginx 설치 완료

- www.somecompany.com으로 Virtual Host 운영

- SonarQube http://sonarhost:sonarport/에서 운영


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


````

 # 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 domain[s] that this vhost server requests for

   server_name www.somecompany.com;

 

   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/) 참조합니다.


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


## 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)

  • No labels