restrict IP access

panosru

Verified User
Joined
Oct 8, 2006
Messages
80
Location
Greece
Hello, for some domains and/or subdomains I would love to have the ability to restrict the IP's that can access them, I suppose it is not possible through DA so what should I do in order to archive that?

Thanks a lot :)
 
Hello Alex, thanks for your reply, I know about that but for I don't know which reason it isn't working properly.

I created an .htaccess file on the folder I want to protect and I wrote inside:

Code:
Order deny,allow
Deny from all
Allow from xxx.xxx.xxx.xxx

What i end up is getting a forbidden page but the IP is 100% correct.
 
Try then to replace directives to make it look like:

Code:
Order Allow,Deny
Allow from apache.org
Deny from xxx.xxx.xxx.xxx

or simply

Code:
Deny from xxx.xxx.xxx.xxx
 
Hello, I tried this and still even if I put my IP for deny (to test) even if I don't I'm still getting forbidden page, maybe apache does not allow htaccess to use Allow/Deny, is that possible?

Also I forgot to mention that I have danginx plugin but I think that has nothing to do with it since htaccess is still processed by apache and not by nginx.

The "Custom Httpd Configurations" is a bit confusing as I don't understand exactly what it mean with "Only add the few lines of the VirtualHost you need to insert. Do not add a whole <Virtualhost>..</VirtualHost>"

Thanks for the support Alex :)
 
Hello, I tried this and still even if I put my IP for deny (to test) even if I don't I'm still getting forbidden page, maybe apache does not allow htaccess to use Allow/Deny, is that possible?

You should read apache error logs for particular domain.

Also I forgot to mention that I have danginx plugin but I think that has nothing to do with it since htaccess is still processed by apache and not by nginx.

I can't say anything about it, I've never used it.
 
Back
Top