Apache configuration under debian
Install an Apache web server for use in an Intranet
To install the server we must run as root the following command:

Create within the / var / www / html directory a file called intrada.html where you put a welcome message

Now I’ll put it inside the route:

Next we will post a more complete page on our server, for it
use your web application website.
We must also give reading permits to others so that we can view it:

Access from customers, putting the following URL in a browser:
From debian client:


Below we will post a more complete page on our server, for this use your web application website:




Local name resolution: modify the required files in the BIND service and access using the name you have indicated:

As I had the dns before I used this name:
Configuration of virtual websites using Apache
The first website will have the base directory will be / var / www / iesgn and will contain a page called index.html, where you will only see a welcome to the page of the Gonzalo Nazarene Institute.

The second website will have the base directory will be / var / www / departments. On this site we will only have a home page index.html, welcoming the page of the departments of the institute.

We need to have two files to make the configuration of the two virtual sites, for that we will copy the file 000-default.conf

Once we have created the files we will add within each the following content:


We will now have to create a symbolic link in the / etc / apache2 / sites-enabled directory.

For these changes to be implemented, we must restart the service:

Now we should update the dns:

Once the dns are restarted, we can access both sites from the browser:


authenticated access to the Apache web server
To enable the basic authentication we must add the following lines to our site configuration file:

Now we create the password file, with the previously created user:

We restart the service and connect:


Now let’s have the department page access only the director and the teacher, and to address only the director, for that we add in departments:

Now let’s add the users of the areas for that, we use this command:
- User teacher to departments:

- Director user to departments:

- User to address area:

We will now restart the service and check that we can access:

We will access departments:


Now to the area management team:


