Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dougthor42 committed Jan 18, 2019
1 parent 6782d46 commit e6d1cec
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,38 @@ ports:
```


### Running behind a proxy

A typical case, for me at least, is adding this application to a server that's
already running Apache for other things. In this case, make the following
adjustments:

1. Add a proxy to the `VirtualHost` in your apache config.
2. Make sure to set the `URL_PREFIX` variable in your Trendlines config file.

```apache
# /etc/apache2/sites-enabled/your-site.conf
<VirtualHost *:80>
...
# optionally replace all instances of "trendlines" with whatever you want
# Make sure the port on ProxyPass and ProxyPassReverse matches what is
# exposed in your docker-compose.yml file.
<Location /trendlines>
ProxyPreserveHost On
ProxyPass http://0.0.0.0:5082/trendlines
ProxyPassReverse http://0.0.0.0:5082/trendlines
RequestHeader set X-Forwarded-Port 80
</Location>
</VirtualHost>
```

```python
# /var/www/trendlines/trendlines.cfg
URL_PREFIX = "/trendlines" # Whatever you put in your Apache proxy
```


## Usage

TODO.
Expand Down

0 comments on commit e6d1cec

Please sign in to comment.