By dvolob
I have site on wordpress, and IP visitor comments is exactly like my IP droplet. So I can not cut off the spammers by their IP. How to make that when someone write a comment on the website, admin panel recorded the actual visitor’s IP?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
If this block proxy_set_header X-Forwarded-For $ proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $ scheme;
is added to
location ~ \ .php $ { fastcgisplitpathinfo ^ (+ \ php…) $ (*.); root $ rootpath; include / etc / nginx / fastcgiparams; fastcgipass 127.0.0.1:9000; fastcgiparam REMOTEADDR $ httpxrealip; fastcgiindex index.php; }
all * .php starts to work! But IP is not transmitted at all, there is an empty space in site page where is to be output IP.
How was your Droplet setup? Did you use a one-click image or did you install all software yourself? We need to know more about how your Droplet was setup before we can help.
To me, initially, it seems like you’re using a reverse proxy and that correct headers are not being sent, so when WordPress queries for the visitor IP, it’s reverting to the server IP as it can’t determine the real IP.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.