Controlling access to /billing

From Kolmisoft Wiki

Jump to: navigation, search

[edit] BY IP address

Create (or Edit if exist) /var/www/html/billing/.htaccess and add following lines to the most bottom of the file:

Order Deny,Allow
Deny from all
Allow from friends_ip another_friends_ip

You can add multiple ip addresses, hostnames or diapazones.

Now restart apache:

/etc/init.d/httpd restart


[edit] By Password

Create (or Edit if exist) /var/www/html/billing/.htaccess and add following lines:

AuthUserFile /var/www/html/billing/.htpasswd
AuthType Basic
AuthName "Password Protected Area"
Require valid-user

Then you have to create .htpasswd file which contains user and password:

htpasswd -b -m -c /var/www/html/billing/.htpasswd yourusername newpassword

omit "-c" if file already exist.

Personal tools


Try M2