Issue with mod_headers

Discussion in 'Apache Migration/Compatibility' started by aisonet, Nov 28, 2013.

  1. aisonet

    aisonet New Member

    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

    <IfModule mod_headers.c>
    Header always set X-WebServer "server1"
    Header unset Server
    </IfModule>
  2. mistwang

    mistwang LiteSpeed Staff

  3. aisonet

    aisonet New Member

    I have the following and it doesnt work, I do not see the header in the HTTP response from litespeed.

    <IfModule mod_headers.c>
    Header set X-SGServer "web1"
    </IfModule>
    Last edited: Dec 2, 2013
  4. aisonet

    aisonet New Member

    When will this get fixed?
  5. mistwang

    mistwang LiteSpeed Staff

    It works with current release.
    Maybe you did not enable .htaccess properly.
  6. aisonet

    aisonet New Member

    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:
    <IfModule mod_headers.c>
    Header set X-SGServer "web1"
    </IfModule>

    Server 2 gets:
    /etc/httpd/conf.d/server-identify.conf:
    <IfModule mod_headers.c>
    Header set X-SGServer "web2"
    </IfModule>
    Last edited: Jan 25, 2014

Share This Page