Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I visit a directory listing page on my Apache server, this footer is visible:

Apache/2.2.22 (Debian) Server at localhost Port 80

How is it possible to modify parts of this footer to my liking?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Use the ReadmeName directive to mod_autoindex in the server configuration file (or in .htaccess if that is allowed). Example:

<!-- This would be located at http://localhost/FOOTER.html -->
<p>This is a test footer.</p>

# This would be in the config file or .htaccess file
ReadmeName /FOOTER.html

Another option: omit the leading forward slash to have httpd instead look for a FOOTER.html file in the listed directory, which you might want to hide in the listing:

ReadmeName FOOTER.html
IndexIgnore FOOTER.html

If no FOOTER.html file exists in a directory, the default footer giving the server version will be displayed.

share|improve this answer

you can try this step

Open a terminal and typing the command

 sudo a2enmod rewrite [enter]
 Enabling rewrite module. ( the message indicates that a2enmod is active)

Then open the file /etc/apache2/sites-available/default with your favorite editor, for example:

 sudo pluma /etc/apache2/sites-available/default

change "AllowOverride none" to "AllowOverride All" (without the quotes), then save and exit. The next step to restart apache2

 sudo /etc/init.d/apache2 restart
share|improve this answer
    
mod_rewrite rewrites the URL requested by the browser, not the content of the returned page (such as an autoindex). –  PleaseStand Jun 19 '12 at 9:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.