How to disable Apache 2 Test Page
- User
How to disable Apache 2 Test Page
Assistant
Here are a few ways to disable the Apache 2 default test page on a Linux server:
- Edit the apache2.conf file (Debian/Ubuntu path is /etc/apache2/apache2.conf) and change the setting for DirectoryIndex:
DirectoryIndex disabled-
Create an index.html file in the /var/www/html directory (or document root) to override the test page. An empty file would work.
-
On Debian/Ubuntu, rename or remove the /var/www/html/index.html file which contains the Apache test content:
mv /var/www/html/index.html /var/www/html/index.html.old- Use a .htaccess file to override the indexes. In /var/www/html/.htaccess:
DirectoryIndex disabled- Comment out the DirectoryIndex directive in apache2.conf if it's enabled to prevent any default indexes.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.