PDA

View Full Version : Protect your Linux CCcamPHPInfo in Debian



me1960
19-02-10, 22:31
Protect your Linux CCcamPHPInfo in Debian

'' 1. Open PuTTY or your preferred terminal app and type the following:

htpasswd -c /etc/apache2/passwords username

(Choose your own user-name. ex: htpasswd -c /etc/apache2/passwords neo)

You will be asked to enter a password twice.

2. chmod 666 /etc/apache2/passwords

3. Edit apache2.conf................. /etc/apache2/
Add the following lines:

<Directory /var/www>
AuthType Basic
AuthName "CCcamInfoPHP"
AuthUserFile /etc/apache2/passwords
Require valid-user
</Directory>

If your files are not under var/www, just put the right path

4. Restart or reload apache with the following command:
/etc/init.d/apache2 reload

and Voila. Now your CCcamPhpInfo will ask you to enter user-name & password . ''