PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Securing Your Linux Web Server Folder Access By IP

Go down

Securing Your Linux Web Server Folder Access By IP Empty Securing Your Linux Web Server Folder Access By IP

Post by jamied_uk 25th April 2016, 15:28

Code:
sudo gedit /etc/apache2/apache2.conf



Locate directory section (for example/var/www/sub/payroll) and set it as follows:
Code:

<Directory /var/www/html/payroll/>
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 192.168.0.5
    Allow from 127.0.1.1
    Allow from 127.0.0.1
</Directory>

Another Example


Code:
<Directory /var/www/html/phpmyadmin/>
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 192.168.1.10
    Allow from 127.0.1.1
    Allow from 127.0.0.1
</Directory>




Now Restart Apache Server

Code:
sudo service apache2 restart
jamied_uk
jamied_uk
Admin

Posts : 2951
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum