yhsiao
Chevereto Member
*️⃣ Must open one ticket per issue. If you are experiencing multiple issues don't hesitate to create multiple tickets for each issue.
▶ Reproduction steps
Unable to obtain user connection ip when using nginx reverse proxy
📃 Error log message
Unable to obtain user connection ip when using nginx reverse proxy
▶ Reproduction steps
- Hello everyone, I use nginx to reverse my chevereto v4 program. I have set 'CHEVERETO_HEADER_CLIENT_IP' => 'X-Real-IP' in env.php, but the program still cannot obtain the user's connection ip. Is there any way to solve it?
- nginx proxy config as fellows:
- location / {
proxy_pass https://xx.xxoo.com;
proxy_redirect https://xx.xxoo.com/ https://$host:$server_port/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header HTTP_X_FORWARDED_FOR $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
} - [Example: Go to /upload and upload a X image]
Unable to obtain user connection ip when using nginx reverse proxy
📃 Error log message
Unable to obtain user connection ip when using nginx reverse proxy