IPv6 address in .htaccess is ignored


2016-11-16 12:44:43 UTC


2017-08-16 14:13:16 UTC


Was this article helpful?

Have more questions?

Submit a request

IPv6 address in .htaccess is ignored

Applicable to:

  • Plesk 11.x for Linux


Apache works with Nginx as proxy. Website's .htaccess allow access only from for IPv6 addresses. Accessing website from IPv6 address fails with error:

 client denied by server configuration: /var/www/vhosts/domain.tld/httpdocs/index.php


Domain's .htaccess is not properly set.


Add the following lines in the domain's ' .htaccess ' file:

    SetEnvIf Remote_Addr "2001:777:f8:1::b101:c991" realremoteaddr <== one line per IP
Allow from env=realremoteaddr

Note: If need to provide an access from additional addresses add additional SetEnvIf Remote_Addr "another_valid_IPv6_address" realremoteaddr line.

Test it by using curl

~# curl -v -I http://domain.tld:7080/index.php

* About to connect() to domain.tld: port 7080 (#0)
* Trying 2001:777:f8:1::b101:c991... connected
Have more questions? Submit a request
Please sign in to leave a comment.