Apache Displaying too much Information

louie55

Verified User
Joined
May 4, 2004
Messages
116
Location
Nebraska
I just upgraded the server to Apache 2.0 via the customapache script. The upgrade was a success, but now Apache is displaying too much about the server on error pages and on directory listing pages.

When one of these pages comes up, it displays this at the bottom of the page:

Apache/2.0.52 (Unix) mod_perl/1.99_17-dev Perl/v5.8.0 mod_ssl/2.0.52 OpenSSL/0.9.7a PHP/4.3.10 FrontPage/5.0.2.2634 Server at www.customerdomain.com Port 80

I have these lines in my httpd.conf, but it still is doing it:

ServerSignature off
ServerTokens Prod

Yes, Prod is the same as ProductOnly.

Anyway, what can I do?

Louie
 
Yes, I restarted Apache multiple times.

Also, after I upgraded. All of the folders in which I had set to display automatic indexes by including:

Options +Indexes

In the .htaccess file didn't display the indexes anymore, it just came up with a 403 Forbidden.

I had to add <Directory> sections in httpd.conf for each folder I wanted indexes in and then add the indexes option between the tags and now it works. Why aren't the .htaccess options working anymore? Not even a protected directory .htaccess file would work until I added a <Directory> section in httpd.conf for it also. It was just letting people in without asking for a password. (Keep in mind this was a protected directory I created with Webmin and not DirectAdmin).


Louie
 
Last edited:
ServerSignature Off
ServerTokens ProductOnly

Do it exactly as above, and restart apache, and it doesn work.

Jeff
 
Did it and it didn't work, it still displays all the information. To put it in context, I put it here:

ServerRoot "/etc/httpd"

PidFile /var/run/httpd.pid

Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
ServerSignature Off
ServerTokens ProductOnly


Is this the right place to put it?

Also, any idea why Apache 2.0 is not processing the .htaccess files??

Louie
 
If it is not working then you are either editing the wrong file, or there is a duplicate entry elsewhere which is read after the lines you put in.
 
Chrysalis, you were right. I should have looked over the file more carefully. There was another set of:

ServerSignature
ServerTokens

Options that were farther down in httpd.conf that were overriding my statements.

That part is fixed. Now, to the .htaccess problem. Or should I create another thread for this?

Louie
 
These are all of the AllowOverride Statements in httpd.conf:

This is the output of grep Allow Override httpd.conf :


AllowOverride None
AllowOverride None
AllowOverride All
AllowOverride None
AllowOverride None



Here they are in context:


<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>


<Directory "/var/www/html">
Options -Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<Directory /home/*>
AllowOverride All
Options MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>

<Directory "/var/www/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>


These are in the order that they appear here. Hope this helps you.

Louie
 
Last edited:
After doing some reading on the subject, should I just change all of the None's to All's?

Louie
 
they look fine to me, for the home dir which user's use its already set to all.
 
Well, it might look fine, but it's not working fine. Are there any other of these that I should change to All?

Louie
 
<Directory /home/*>
AllowOverride All
Options MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>

Ok the above applies to all in /home/, now if you are trying to get it to work in a location not in /home then you might need to change the config otherwise it is fine.
 
Ok, thank you. You have helped a lot! I think it IS in a directory other than that! Thanks again, and I think I can get it fixed.

Louie
 
Back
Top