kopia lustrzana https://github.com/dgtlmoon/changedetection.io
No trailing slash when hosting on a subdomain, see discussion 904
rodzic
b08e8fcc1b
commit
d11b7f0d91
|
@ -1,19 +1,9 @@
|
||||||
You need to enable the `USE_X_SETTINGS` environment variable in the application for it to respect the headers sent from nginx
|
You need to enable the `USE_X_SETTINGS` environment variable in changedetection.io for it to respect HTTP headers sent from the reverse proxy (such as `Host`, `X-Forwarded-Prefix` and `X-Forwarded-Proto`).
|
||||||
|
|
||||||
Without this, the application will not listen to the following variables
|
The easiest way is to create an extra docker-compose YML file and run it with the shipped version.
|
||||||
|
Create a `docker-compose.nginx.yml` (`expose` may not be what you want, but up to you):
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
proxy_set_header Host "localhost";
|
|
||||||
proxy_set_header X-Forwarded-Prefix /app;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
```
|
|
||||||
|
|
||||||
Easiest example is to create an extra docker-compose YML file and run it with the shipped version
|
|
||||||
|
|
||||||
Create a `docker-compose.nginx.yml`, `expose` may not be what you want, but up to you.
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
changedetection.io:
|
changedetection.io:
|
||||||
|
@ -40,9 +30,9 @@ networks:
|
||||||
changenet:
|
changenet:
|
||||||
```
|
```
|
||||||
|
|
||||||
## NGINX
|
## NGINX Reverse Proxy
|
||||||
|
|
||||||
And an example `nginx.conf`
|
And an example `nginx.conf` which hosts changedetection on the subdirectory `/app`:
|
||||||
|
|
||||||
```
|
```
|
||||||
server {
|
server {
|
||||||
|
@ -58,7 +48,7 @@ server {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
*Note the trailing `'/'` on the location line. This is needed to display some css elements correctly.*
|
When using a subdirectory, it's important to have a trailing `'/'` on the location line. Otherwise, static CSS and JS content will not load properly. The trailing slash is not needed when hosting changedetection.io on a subdomain.
|
||||||
|
|
||||||
|
|
||||||
Then simply
|
Then simply
|
||||||
|
@ -78,7 +68,7 @@ _Note_: You may like to comment out the `ports:` section of the base `docker-com
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Caddy Server Reverse Proxy
|
## Caddy Reverse Proxy
|
||||||
|
|
||||||
|
|
||||||
In Caddy alternately, you just need to configure the X-Forwarded-Prefix.
|
In Caddy alternately, you just need to configure the X-Forwarded-Prefix.
|
Ładowanie…
Reference in New Issue