IP Restriction for App Services on Linux


In order to restrict access to clients based on IP Address in App Services on Linux we need to add entries in the .htaccess file. For App Services on Windows click here.

In App Services on Linux, the visitor/client IP is made available to the web app through “X-Client-IP” environment variable. The log format is available here: /etc/apache2/apache2.conf.

NOTE: .htaccess is relevant for Apache based web apps only

In .htaccess file, we will use this field to allow or deny access to clients.

Allow specific IP-Address

Deny specific IP-Address

In the above configuration replace xxx.xxx.xxx.xxx with the corresponding client IP address.


Comments (0)

Skip to main content