LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-22-2007, 08:41 PM   #1
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Rep: Reputation: 30
Question Disable httpd.conf server os token


we all know as httpd (apache) serve webpages, in every communication with web clients, the apache version will be send out.

Is there anyway to prevent it (version number) to be sent out? I was told it can be done in httpd.conf over some configuration call serverOsToken but I can't find it.

Anyone knows?
 
Old 01-22-2007, 09:37 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
You're probably looking for this:

http://httpd.apache.org/docs/2.0/mod...l#servertokens
 
Old 01-23-2007, 12:21 AM   #3
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Original Poster
Rep: Reputation: 30
ah its servertokens.. thanks!

but there's no way to totally turn it off? (ok I know I am being anal...)
 
Old 01-23-2007, 03:17 AM   #4
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Original Poster
Rep: Reputation: 30
is it possible to turn off the php version too?
 
Old 01-23-2007, 06:53 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by Swakoo
is it possible to turn off the php version too?
Did you not read the page I linked you to?

Here are the options for this Directive:

Code:
ServerTokens Prod[uctOnly]
Server sends (e.g.): Server: Apache
ServerTokens Major
Server sends (e.g.): Server: Apache/2
ServerTokens Minor
Server sends (e.g.): Server: Apache/2.0
ServerTokens Min[imal]
Server sends (e.g.): Server: Apache/2.0.41
ServerTokens OS
Server sends (e.g.): Server: Apache/2.0.41 (Unix)
ServerTokens Full (or not specified)
Server sends (e.g.): Server: Apache/2.0.41 (Unix) PHP/4.2.2 MyMod/1.2
 
Old 01-23-2007, 09:35 PM   #6
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by trickykid
Did you not read the page I linked you to?

Here are the options for this Directive:

Code:
ServerTokens Prod[uctOnly]
Server sends (e.g.): Server: Apache
ServerTokens Major
Server sends (e.g.): Server: Apache/2
ServerTokens Minor
Server sends (e.g.): Server: Apache/2.0
ServerTokens Min[imal]
Server sends (e.g.): Server: Apache/2.0.41
ServerTokens OS
Server sends (e.g.): Server: Apache/2.0.41 (Unix)
ServerTokens Full (or not specified)
Server sends (e.g.): Server: Apache/2.0.41 (Unix) PHP/4.2.2 MyMod/1.2
I did, and I am using the Prod option. Just that when I run a simple php script I realise it is still showing the PHP version, though not the apache one.

So am just wondering.
 
Old 01-24-2007, 05:24 AM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by Swakoo
I did, and I am using the Prod option. Just that when I run a simple php script I realise it is still showing the PHP version, though not the apache one.

So am just wondering.
What does this php script look like? It might behave differently that displays the php version.
 
Old 01-24-2007, 11:38 PM   #8
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Original Poster
Rep: Reputation: 30
actually I just ran 'php mail.php' off the CLi, where mail.php is a simple script that does mailing using mail()

it showed the php version
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Should I include srm.conf in httpd.conf in apache2? xpucto Linux - Software 3 02-16-2006 08:16 AM
configuration of httpd.conf to run apache server adityabhat2 Linux - Newbie 2 02-13-2005 12:10 PM
Red Hat 9 server can't write PHP script, problem in httpd.conf file? x_menno_x Linux - Newbie 27 06-29-2004 04:44 PM
saving changes to apache2/conf/httpd.conf file Zaius Linux - Newbie 6 01-09-2004 11:45 PM
httpd chokes on ScriptAlias line in Apache httpd.conf lhoff Linux - Software 1 07-14-2003 10:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:17 AM.

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