LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-14-2004, 02:54 PM   #1
Vort3x
LQ Newbie
 
Registered: Oct 2004
Distribution: Mandrake 10.1
Posts: 16

Rep: Reputation: 0
Modify Header Response


Hello,
Currently if I ask for a header response I get this from my server:

HTTP/1.1 200 OK
Transfer-Encoding: chunked
Date: Tue, 14 Dec 2004 20:46:45 GMT
Server: Apache-AdvancedExtranetServer/2.0.50 (Mandrakelinux/7.2.101mdk) mod_perl/1.99_16 Perl/v5.8.5 PHP/4.3.8 mod_ssl/2.0.50 OpenSSL/0.9.7d
Last-Modified: Sat, 04 Dec 2004 16:19:23 GMT
ETag: "5450-6de-9e47b8c0"
Accept-Ranges: bytes
--------------: ----
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=ISO-8859-1

Now on some sites you can edit the "server" details to only show Apache Webserver. Or anything you want. I wanted to know how do I edit the header response to not show server details?

Last edited by Vort3x; 12-15-2004 at 05:37 PM.
 
Old 12-14-2004, 10:37 PM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Usually it's the httpd.conf file in /etc/httpd/conf/

Find the line that says ServerTokens and change the entry to:
ServerTokens Prod

Then restart apache

You should then just get:
Server: Apache

Error Reply footers will be:
Apache Server at 1.2.3.4 Port 80
 
Old 12-15-2004, 02:07 PM   #3
Vort3x
LQ Newbie
 
Registered: Oct 2004
Distribution: Mandrake 10.1
Posts: 16

Original Poster
Rep: Reputation: 0
I checked the httpd.conf file and it was not there, looked manually, and did a few searches... nothing. I also looked in the httpd2.conf for fun and nothing was there either.

Last edited by Vort3x; 12-15-2004 at 05:36 PM.
 
Old 12-15-2004, 03:12 PM   #4
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
Quote:
Originally posted by Vort3x
I checked the httpd.conf file and it was not there, looked manually, and did a few searches... nothing. I also looked in the httpd2.conf for fun and nothing was there either.

Does anyone have any other ideas where I can find how to change the header response?
Look harder. First make sure you are looking at the correct configuration file. If you are 100% sure there is no ServerTokens directive, add the line Capt_Caveman stated above to your config file and restart apache.
 
Old 12-15-2004, 04:19 PM   #5
Vort3x
LQ Newbie
 
Registered: Oct 2004
Distribution: Mandrake 10.1
Posts: 16

Original Poster
Rep: Reputation: 0
I'm absoloutley positive that it is not there. I downloaded the file to my own computer and searched it and found nothing as well.

So where do I add this line, I tried in httpd.conf like this:
Quote:
### Main Configuration Section
### You really shouldn't change these settings unless you're a guru
###
ServerType standalone
ServerRoot /etc/httpd
ServerTokens Prod
#ServerName localhost
#LockFile /etc/httpd/httpd.lock
PidFile /var/run/httpd.pid
ScoreBoardFile /etc/httpd/httpd.scoreboard
ErrorLog logs/error_log
LogLevel warn
ResourceConfig /dev/null
AccessConfig /dev/null
DocumentRoot /var/www/html
Restarted apache, that didn't work.
Removed it, added it to the same spot in httpd2.conf, same results, so restarted.

Where do I add the line "ServerTokens Prod" in the config file?

Thank you.
 
Old 12-15-2004, 05:42 PM   #6
Vort3x
LQ Newbie
 
Registered: Oct 2004
Distribution: Mandrake 10.1
Posts: 16

Original Poster
Rep: Reputation: 0
Problem resolved, haha, it was in commonhttpd.conf. Thanks.
 
Old 12-15-2004, 05:59 PM   #7
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
I was incorrect, Mandrake adds their own patch to Apache that changes the product name to Apache-AdvancedExtranetServer instead of just Apache, so do you see just Apache or Apache-AdvancedExtranetServer?

Last edited by Capt_Caveman; 12-15-2004 at 06:00 PM.
 
Old 12-16-2004, 08:14 AM   #8
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
Quote:
Originally posted by Capt_Caveman
I was incorrect, Mandrake adds their own patch to Apache that changes the product name to Apache-AdvancedExtranetServer instead of just Apache, so do you see just Apache or Apache-AdvancedExtranetServer?
Don't oyu just love vendor-bastardized versions of open-source software?
 
Old 12-17-2004, 12:58 PM   #9
Vort3x
LQ Newbie
 
Registered: Oct 2004
Distribution: Mandrake 10.1
Posts: 16

Original Poster
Rep: Reputation: 0
Yes it only shows Apache-AdvancedExtranetServer now.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to modify the library path variable?modify the Electronkz Linux - Newbie 1 04-13-2004 06:18 AM
I want change mail header info, which config file i should modify? exper Linux - Software 2 12-05-2003 06:46 AM
modify file access & modify timestamps i2itstud Linux - General 1 05-20-2003 03:34 AM
Error reading WWW server response (HTTP Header)?? cuboctahedron Linux - Newbie 7 02-20-2003 04:10 AM
modify the telnet header message? doris Linux - Security 1 06-09-2002 01:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration