Files
SCM-Manager/docs/en/installation/nginx.md

49 lines
1.0 KiB
Markdown
Raw Normal View History

---
title: SCM-Server and Nginx
---
2020-03-09 08:01:43 +01:00
2020-03-31 17:28:30 +02:00
## Nginx configuration
2020-03-09 08:01:43 +01:00
2020-03-31 17:28:30 +02:00
```text
2020-03-09 08:01:43 +01:00
location /scm {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_pass http://localhost:8080;
}
```
2020-03-31 17:28:30 +02:00
## SCM-Server conf/server-config.xml
2020-03-09 08:01:43 +01:00
Uncomment following line:
2020-03-31 17:28:30 +02:00
```xml
2020-03-09 08:01:43 +01:00
<Set name="forwarded">true</Set>
```
Example:
2020-03-31 17:28:30 +02:00
```xml
2020-03-09 08:01:43 +01:00
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
<Set name="host">
<SystemProperty name="jetty.host" />
</Set>
<Set name="port">
<SystemProperty name="jetty.port" default="8080"/>
</Set>
<!-- for mod_proxy -->
<Set name="forwarded">true</Set>
</New>
</Arg>
</Call>
```
2020-05-26 14:13:46 +02:00
## SCM-Manager Configuration
2020-03-09 08:01:43 +01:00
* Login as an admin user and select "General"
* Set the "Base Url" to the URL of Nginx (**warning:** don't check "Force Base Url")
2020-05-26 14:13:46 +02:00
* Save the new settings