• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • 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