Yo Jeremy...How the heck did you change your response headers????
Hi,
Scanning http://www.linuxquestions.org with id serve from grc.com shows that you running "Server: Jeremys HTTPD (OS??) ". Lets assume your running apache. Maybe you can help me. 1) Did u change httpd.h? 2) Did u change something else? 3) If its httpd.h, is there a way to reflect the changes without recompiling 4) If i have to recompile, is there a way to get the necessary scripts to recompile. Oracle http uses apache server. But it does not install with the necessary scripts to recompile. Please help me since i Have been searching and trying to figure this out for almost a month THanks |
Well then.............does anyone know how?
|
i'd put this in the website sugggestions page Jeremy reads and posts there I think
|
I read and post everywhere :study:
As for how I made the web server do that, I wouldn't recommend what I did. You can edit the apache source to return whatever you want though. Offhand I wouldn't know the exact file to edit, but I quick look at the source should tell you. --jeremy |
You usually would look for a line like "#define VERSION" for 2.x series I think it's in include/httpd.h. Else you could try using apache-mod_headers (mod_headers.so) to change headers, but I havent got any experience with that.
Changes in httpd.h can't work w/o recompiling. |
Hey guys,
I will take a look at apache-mod_headers (mod_headers.so) to see if i can find a way to do this and then ill let youz know. Most normal situations you can just edit httpd.h. But as i stated before, i cant recompile. Thanks |
Well the module is not good because the main goal is to change the server version.
Taken from apache:: The Header directives are processed just before the response is sent by its handler. These means that some headers that are added just before the response is sent cannot be unset or overridden. This includes headers such as "Date" and "Server". So what the F. I simply want to change the server thats shown for the response header. Nothing is ever easy. Ill take any more suggestions. Thanks |
If I telnet in to my apache server and give the command:
GET / HTTP 1.0 (followed by a blank line) At the top bit it says something like Server: Apache/1.3.20 (Unix) Now if I scan the executable httpd I can find that exact same string. strings httpd | grep "Apache/1.3.20 (Unix)" So I guess if you can't recompile all you would have to do is use a hex editor to modify that string. Make sure you backup the original file just in case you totally mess it up. And remember the string you replace it with should be the same length. If it's shorter you can always replace the last few characters with spaces. You'll also find more of them if you run the command strings httpd | grep -i "apache" I don't know when each one is used but I'll leave that to you to figure out. |
Hi,
I found a few. Changed them and still nothing. Question: Is there a way to just compile httpd.h somehow. When httpd.h is compiled, where is the object. And can the object be modified. My security book says the headers are coming from httpd.h. I changed and somehow i have to recompile the sucker. Thanks again |
well well well....I finally did it. Hey Mik!!! You the man.
I downloaded a free trial hex editor. The file to edit is httpd binary. I edited and changed all references of my server version and waaaaa laaaaa. I start apache like this. /bin/apachectl start in the dir /bin there is a file called httpd. Thats the one to change just in case someone that reads this wants to do it. I thank everyone. |
All times are GMT -5. The time now is 02:59 AM. |