Archive for the tag 'Accessing'

How to block a specific IP Address from accessing your Website

If you have annoying visitors, site scrapers, or spammers, you may find it useful to block these users from accessing your website content. You can block bad visitors by IP Address (or blocks of IP Addresses) using a .htaccess file. Below are some useful examples.

In the following example, all IP Addresses and domains are accepted, except for xxx.xxx.xxx.xxx and bad-site-example.com.

# allow all except those indicated here
<Files *>
order allow,deny
allow from all
deny from xxx.xxx.xxx.xxx
deny from .*bad-site-example\.com.*
</Files> 

In the following example, all IP addresses are denied access except for xxx.xxx.xxx.xxx and good-site-example.com.

# Deny access to everyone, except those listed here:
<Files *>
order deny,allow
deny from all
allow from xxx.xxx.xxx.xxx
allow from .*good-site-example\.com.*
</Files> 
SBDavid

Accessing web_users in plesk

Accessing web_users

By default in Plesk, we can only access the web users using http://domain.com/~webuser/. Do the following steps to access the web users using the URL http://domain.com/webuser/

1. Add the following entry in the /var/www/vhosts/domain.com/conf/vhost.conf file of the domain:
Alias /webuser /var/www/vhosts/domain.com/web_users/webuser

2. Now reconfigure the domain using websrvmng:
/usr/local/psa/admin/bin/websrvmng –reconfigure-vhost –vhost-name=