[Resolved] Issue with mod_headers

Status
Not open for further replies.
#1
Im running the latest version of Litespeed Web Server Enterprise v4.2.6 and I have a apache file that worked fine in apache, but is not working with Litespeed, I checked the headers and the server header is not removed and the new header X-WebServer is not added to the HTTP request. We need this since we are running litespeed in a cluster environment and need to see what server we are talking to.

/etc/httpd/conf.d/server-identify.conf
Code:
<IfModule mod_headers.c>
Header always set X-WebServer "server1"
Header unset Server
</IfModule>
 
Last edited by a moderator:
#3
I have the following and it doesnt work, I do not see the header in the HTTP response from litespeed.
Code:
<IfModule mod_headers.c>
Header set X-SGServer "web1"
</IfModule>
 
Last edited by a moderator:
#6
Its not in the .htaccess, we dont want to use this in the .htaccess as this wouldnt make sense. We want it to be server wide and by server so it has to be in a file:

/etc/httpd/conf.d/server-identify.conf

Server 1 gets:
/etc/httpd/conf.d/server-identify.conf:
Code:
<IfModule mod_headers.c>
Header set X-SGServer "web1"
</IfModule>
Server 2 gets:
/etc/httpd/conf.d/server-identify.conf:
Code:
<IfModule mod_headers.c>
Header set X-SGServer "web2"
</IfModule>
 
Last edited by a moderator:

NiteWave

Administrator
#8
Wow, an thread 1 year 10 months old!

Header set X-SGServer "web2"
should work on lsws 4.x as well ?

anyway I did tests just now, now lsws version is 5.0.7

1. Header set
Header set X-SGServer "web2"
works at server level, both litespeed and apache

2.Header unset Server
litespeed: works at server level and .htaccess
apache: can't unset Server, either server level or .htaccess
so I can unset
"Server: LiteSpeed"
but can't unset
"Server: Apache/2.2.3 (CentOS)"
!

3.Header unset X-SGServer
works at server level and at .htacess, both litespeed and apache
 
Status
Not open for further replies.
Top