Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Altering "Server" HTTP Header Param

by blakem (Monsignor)
on Oct 14, 2002 at 20:59 UTC ( #205216=note: print w/replies, xml ) Need Help??


in reply to Altering "Server" HTTP Header Param

I think you'll have to tweak the apache source and recompile. The relevant file is src/main/http_main.c. Grep for 'server_version' and 'SERVER_BASEVERSION' to find the lines that deal with setting the server name.

The logic to create that value has gotten more complex since I looked at it ages ago, so it will take some work to figure out exactly how it gets set.

-Blake

Replies are listed 'Best First'.
Re: Re: Altering "Server" HTTP Header Param
by gryphon (Abbot) on Oct 14, 2002 at 21:06 UTC

    Greetings blakem,

    Yeah, I noticed that. Unfortunately, I can't recompile Apache since this all lives in an account on an ISP. I'm hoping that I can either find a Perl solution to force the "Server" header change, or use an ".htaccess" file to do something for me.

    I'm getting discouraged, though. I think I'm screwed.

    gryphon
    code('Perl') || die;

      To actually change the server tokens you need to recompile, but you can turn them off with the ServerTokens directive.

      Unfortunately, “[the] setting[s] appl[y] to the entire server, and cannot be enabled or disabled on a virtualhost-by-virtualhost basis.” Which means it must be used in the main server configuration files. Some ISPs can be convinced to turn them off completely on a security basis — other than that you’re out of luck.

        That changes what comes after 'Apache' in the Server header, not the 'Apache' string itself.

        -Blake

      I'm afraid you are screwed if you can't recompile Apache. There is no other way to do it.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://205216]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2019-08-21 22:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?