Comments (10)
@ukutaht Looks like that was it! Thanks for the pointer; I hadn't even considered my reverse proxy being the problem.
Would there be interest in a PR adding documentation for how to setup NGINX in front of Plausible in the self-hosting docs? I see that the docs mention there being instructions "below", but I couldn't find them. Alternatively (or additionally) a pre-made NGINX config could be added to this repo if there is interest.
from community-edition.
If it helps, my Plausible instance is public at https://plausible.jfagerberg.me/jfagerberg.me
from community-edition.
Hey, thanks for the report.
I maintain a testing instance for the self-hosted configuration over at testing.plausible.io (our prod setup is a bit different). So far I didn't have geoip configured so I thought I would follow the same steps to see what works.
After updating the geoip/docker-compose.geoip.yml
with the volume and the geoip/geoip.conf
with my credentials, I rebooted the system with docker-compose down
and then docker-compose -f docker-compose.yml -f geoip/docker-compose.geoip.yml up -d
.
As you can see, countries are being captured now: https://testing.plausible.io/plausible.io
Unfortunately without being able to reproduce the issue, it's difficult to debug. My first thought is that maybe you're sitting behind a proxy that doesn't implement X-Forwarded-For
correctly? This would throw off the Plausible server, not just for countries but also for unique user counting. Let me know if you think that's a possibility.
Otherwise we can think about adding some logging around the country lookup and you could deploy that image with log_level: :debug
to get some more intel.
from community-edition.
Yeah I think we'll get a PR with configuration for Traefik soon: https://plausible.discourse.group/t/self-hosting-https-how-to/87/5
I'd also love to have read-made configs for Nginx and Caddy.
Just out of curiosity, how was your nginx configured? What change made it work?
from community-edition.
@ukutaht My NGINX config is super simple. The part that isn't managed by Certbot is:
server {
server_name plausible.jfagerberg.me;
location / {
proxy_pass http://127.0.0.1:7654;
# added line below to fix issue
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
(where 7654 is the port I'm binding Plausible to)
I'll hopefully get around to throwing together a PR for the self-hosting docs sometimes tomorrow. I'm assuming a new page under the self-hosting category would be preferable over adding it as a subsection of the Getting started page?
from community-edition.
Looks good! I wish nginx automatically sent X-Forwarded-For when using proxy_pass
Would be best to add a new docker-compose override in addition to adding documentation. I think runnable code is the best way to document something.
from community-edition.
If we're adding a docker-compose override, then I'm assuming that the goal is to be as plug-and-play as possible. Since it doesn't really make much sense to offer multiple different reverse proxy images, it'd probably be best to choose between caddy-gen for its simplicity, nginx-proxy
for being semi-simple and well-maintained, or Traefik for its maturity (and then hope that anyone who's running an existing reverse proxy know how to configure it ;) )
I'll try to get around to it tomorrow.
from community-edition.
I'd be quite happy to offer all 3 as well and let the user pick depending on which docker-compose override file they include
from community-edition.
It's obviously your decision in the end, but may I ask why? Since running a reverse proxy as a docker container only makes sense if users aren't running a reverse proxy to begin with (otherwise it will clash with the existing instance), there's very little point in letting people choose, assuming all the reverse proxies have feature parity which they do for this case.
I can see the point in providing configs for both Caddy, NGINX and Traefik so users can choose the appropriate one if they're already running a reverse proxy - but bundling the reverse proxy as a docker-compose override would only make sense if they aren't running one to begin with.
from community-edition.
@birjolaxew I think you're right, it's best to choose one to bundle in the docker-compose and provide example configs for different servers for when they run separately.
from community-edition.
Related Issues (20)
- document SMTP options and issues better HOT 1
- improve clone command
- document FINCH_IPV6
- improve documentation for SMTP options HOT 1
- ship with plausible-conf.env.example HOT 1
- document TOTP_VAULT_KEY length requirement HOT 1
- add Bamboo.Mua + gmail app password guide HOT 1
- document extra config
- Web page is not accessible after deploy containers using docker composer HOT 1
- Is it possible to use GeoIP databases with additional information? HOT 4
- document docker compose override files
- Arm64 Images support HOT 2
- Upgrade from 1.5 to 2.1 RC resulted in data loss HOT 2
- CH volume for logs
- Don't use plausible-tracker-node
- SMTP SSL Configuration needs clarity HOT 1
- ensure volumes are not deleted
- document CONFIG_DIR
- restrict user access on invite_only
- mention Fly.io in IPv6 env vars
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from community-edition.