• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Unable to obtain user connection ip when using nginx reverse proxy

Version
4.0.5
Website URL
https://www.imagehub.cc
PHP version
8.1
Database driver
MySQL
Database version
8.0
Web browser
chrome edge

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
  1. 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?
  2. nginx proxy config as fellows:
  3. 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;
    }
  4. [Example: Go to /upload and upload a X image]
😢 Unexpected result
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
 
Back
Top