matomo-org / matomo-org/docker
Forward real ip in .examples/nginx
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 1k
- Forks
- 384
- PR merge metrics
- No merged PRs in 30d
Description
The IP displayed is wrong, because nginx will not send it to php-fpm.
Add this to `.examples/nginx/matomo.conf` on line 24:
```nginx
fastcgi_param REMOTE_ADDR $http_x_real_ip;
```
---
**Side note:**
For the external nginx server (listening to 80/443), one can add:
```nginx
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open `.examples/nginx/matomo.conf` and inspect the FastCGI parameters around line 24. Update the example so PHP-FPM receives the real client IP, then verify the configuration remains valid and the displayed IP is correct when traffic arrives through the external nginx proxy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nginx
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100