To achieve this, open apache configuration file:
Go to Virtualhost section. Assuming the site as Wordpress site and the document root is "/home/domain/public_html/".
Add the following under the virtualhost.
<Directory /home/domain/public_html>
Order Deny,Allow
Deny from All
Allow from IP
</Directory>
Normally, Wordpress login Page is blocked from external IP, to prevent from attack. This is achieved by adding the following entry under the Virtualhost.
<Files wp-login.php>
Order Deny,Allow
Deny from All
Allow from <IP>
</Files>
Do ,
#apachectl configtest
#/etc/init.d/httpd graceful
Here IP is the public IP from which access is required.
Once done, If "wp-login.php: or website(domain) is accessed from IP other than public IP, it will show as forbidden.
Also, checking the domain error log shows the error as:
................................client denied by server configuration..........................
More about apache directives can be learn from:
URL : http://httpd.apache.org/docs/2.2/configuring.html
Go to Virtualhost section. Assuming the site as Wordpress site and the document root is "/home/domain/public_html/".
Add the following under the virtualhost.
<Directory /home/domain/public_html>
Order Deny,Allow
Deny from All
Allow from IP
</Directory>
Normally, Wordpress login Page is blocked from external IP, to prevent from attack. This is achieved by adding the following entry under the Virtualhost.
<Files wp-login.php>
Order Deny,Allow
Deny from All
Allow from <IP>
</Files>
Do ,
#apachectl configtest
#/etc/init.d/httpd graceful
Here IP is the public IP from which access is required.
Once done, If "wp-login.php: or website(domain) is accessed from IP other than public IP, it will show as forbidden.
Also, checking the domain error log shows the error as:
................................client denied by server configuration..........................
More about apache directives can be learn from:
URL : http://httpd.apache.org/docs/2.2/configuring.html