Skip to content
This repository has been archived by the owner on Jun 18, 2022. It is now read-only.

Latest commit

 

History

History
22 lines (18 loc) · 597 Bytes

File metadata and controls

22 lines (18 loc) · 597 Bytes

Restrict access to a web page

We can changes the access restriction on this files:

  • /etc/apache2/apache2.conf
  • /etc/apache2/sites-available/default-ssl.conf

We have to add a new entry

<Directory /var/www/html/myTest/>
    Order allow,deny
    Allow from 192.168.1.10 - It`ll allow the access to pages from 192.168.1.10
    Deny from 192.168.1.11 - It`ll deny the access to pages from 192.168.1.11
</Directory>

Validate configuration

sudo apachectl configtest

Training