Apache Client IP
Hello everyone,
I'm trying to restrict the access to the login file by IP.
In .htaccess file I added the following lines:
order deny,allow
deny from all
allow from my.ip.address
But It doesn't work because I access the web site and then, in the new tab I go in WHM => Apache Status the IP Client " (IP address of the user who requested the data) it is the same as the server...
Thank you!
-
Hey there! The code you have posted is the correct code to include in the .htaccess file for what you are trying to achieve. I'm not sure I understand why the IP address would be the same as the server IP - are you using any tools like Nginx or any other proxy services? 0 -
Hello everyone, I'm trying to restrict the access to the login file by IP. In .htaccess file I added the following lines: order deny,allow deny from all allow from my.ip.address But It doesn't work because I access the web site and then, in the new tab I go in WHM => Apache Status the IP Client " (IP address of the user who requested the data) it is the same as the server... Thank you!
what you do is fine, in fact I have added a similar but general rule at the apache level to limit access to all wordpress websites##login wp order deny,allow deny from all allow from 1.1.1.1 ErrorDocument 403 "Restricted access"0 -
Hey there! The code you have posted is the correct code to include in the .htaccess file for what you are trying to achieve. I'm not sure I understand why the IP address would be the same as the server IP - are you using any tools like Nginx or any other proxy services?
Yes, I'm using Nginx as reverse proxy. I tried to disable it but nothing changed.0 -
I don't have a good explanation for that behavior on my side. If you'd like us to take a look at the system we'd be happy to do that if you can submit a ticket to our team. If you're able to put in that ticket, just post the number here so I can follow along. 0 -
UPDATE: the problem was solved just by uninstalling NGINX reverse proxy. 0 -
@anei Thanks for the update! I'm glad to hear you were able to get this working and I'm sure future users will appreciate your answer if they run into the same problem. 0
Please sign in to leave a comment.
Comments
6 comments