Default/Sample Web Directories Exist

Many web directories that are installed by default contain sample files that were not meant for external access. These files could contain potentially sensitive system or propriety information that could be accessible by an external attacker. In addition a lot of these sample files and folders are vulnerable to known exploits and attacks that, at a minimum, could result in a denial of service attack, or lead to complete system compromise in a worst case scenario.

Depending on the Apache version you're running, you can simply shut off these directories (like the documentaion alias, etc.) unload unneeded server modules like the serverinfo and status modules, etc.

To disable/modify virtual host configurations on Apache2 based webservers, go to the directory "/etc/apache2/sites-enabled", look through all the symlinks in there and remove the ones you don't need.
Don't worry, if you accidentally deleted one they're still there in the "/etc/apache2/sites-available" directory and can be re-established with the command `ln -s /etc/apache2/sites-enabled/NAME /etc/apache2/sites-available/NAME`.

Then, when you have tuned your webserver configuration, you can have a look at the modules that are loaded in your server and wipe out the ones that are not needed. The enabled modules are (like the VHosts) in a separate directory which is called /etc/apache2/mods-enabled (vs. /etc/apache2/mods-available where all available modules are listed) and remove the ones you don't need.

After you're done, reload the apache configuration with `/etc/init.d/apache2 reload` and run your scanning tool again to find out if things got better.

Unfortunately, without knowing what your scanning tool has mentioned as security flaws I cannot give you an exact answer about what to disable and what not. That also mostly depends on what your applications need from your webserver.

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…

Learn several ways to interact with files and get file information from the bash shell.
ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…