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 서버를 운영하기 위한 설정을 가이드합니다. 보안상의 이유 혹은 복수의 분리된 어플리케이션을 함께 사용하기 위해 본 섹션에 가이드 된 내용의 설정이 필요할 수 있습니다.
Info | ||||||
---|---|---|---|---|---|---|
| ||||||
| ||||||
Panel | ||||||
| ||||||
|
서버설정
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/에접근할수있도록합니다:
Code Block | ||
---|---|---|
| ||
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를 참조합니다.
Nginx 사용하기
다음의상황을가정합니다:
- - Nginx 설치완료
- - www.somecompany.com으로 Virtual Host 운영중
- - SonarQube는 http://sonarhost:sonarport/에서운영중
Nginx 환경파일을수정합니다. http://www.somecompany.com/를통해 SonarQube에접근하기위해다음내용을추가합니다.
Code Block | ||
---|---|---|
| ||
# 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/를참조합니다.
Sonarqube는 2048자이상의 URL을요청하는경우가있으므로 max URL length를증가해야할수도있습니다.
IIS 사용하기
http://blog.jessehouwing.nl/2016/02/configure-ssl-for-sonarqube-on-windows.html를 참조합니다.