Introduction
This article provides the steps to customize the Apache Directory Listing.
Please note that the configuration and coding involved in making this customization requires a systems administrator or developer's skill, training, and expertise. cPanel support cannot assist with implementing this kind of customization.
Procedure
- Log into the cPanel user's cPanel account.
- Open the "Indexes" app in the "Advanced" section of cPanel.
Please note that you must contact your server administrator to enable this feature if it is missing. - Click the "Edit" button for your site's folder.
- Select the "Show Filename Only" or "Show Filename and Description" option.
- Click the "Save" button.
- Access the server's command line as the cPanel user via SSH or "Terminal" in cPanel.
- Open the site's
.htaccess
file in your preferred text editor. - Add the
HeaderName
directive to the top of the file.HeaderName customIndexListing.html
- Save the changes and exit the text editor.
- Create the
customIndexListing.html
file.touch customIndexListing.html
- Open the
customIndexListing.html
file in your preferred text editor. - Add the following to the file.
<html>
<head>
<title>Directory Title</title>
</head>
<body>
<h1>Directory Title</h1> - Customize the HTML as desired.
Please note that custom CSS may be included in the<head>
section. - Save the changes and exit the text editor.
Comments
0 comments
Article is closed for comments.