SSI in LS4?

Discussion in 'Install/Configuration' started by ShannonA, Jan 24, 2014.

  1. ShannonA

    ShannonA Well-Known Member

    I just converted some of my apache configuration files into Litespeed configuration, and the Server-Side Includes (SSI) stopped working.

    The only references I could find online said that they were supported as of 4.X and that you needed to add mime types, which I did.
    No go. (I tried both as html, which is how they're setup now and a shtml text) Am I missing something else? Has something changed? I'm pretty sure these were working before I did the configuration change, so I assume it's just a config issue ...
  2. mistwang

    mistwang LiteSpeed Staff

    It should work. what if you remove the setting about html, htm, only leave the shtml one?
  3. ShannonA

    ShannonA Well-Known Member

    I've tried changing html back to text/html, but it's still broken.
    I'm doing these changes to the file by hand in the lsws/conf directory, as you can see.

    You only other weirdness I can see related to MIME is that I've always gotten this error:
    But there's no perl-script in the file:
  4. mistwang

    mistwang LiteSpeed Staff

    turn on debug logging and check the log.
    It requires Apache style configuration

    to turn it on.
  5. ShannonA

    ShannonA Well-Known Member

    The problem is that we've moved away from Apache-style configuration, which seems to have had a large, beneficial effect on our server's efficiency. We certainly don't want to reverse that.

    We need to be able to serve these server-side include pages within the regular LiteSpeed configuration. As is, hundreds of pages are currently offline following the change from Apache to LiteSpeed configuration.

  6. mistwang

    mistwang LiteSpeed Staff

    By default it is on for native LSWS configuration, so SSI should work with a default installation.
    If SSI is disabled, you will get log message like
    in the error.log at INFO level.

    Are you using latest version 4.2.7?
  7. ShannonA

    ShannonA Well-Known Member

    4.2.6 which is still listed as the latest release in our control panel:

    I restarted the server with logs set to INFO and don't see anything:
    Here's a page that I believe was working prior to the changeover to LS config:
  8. mistwang

    mistwang LiteSpeed Staff

    It is highly likely that .shtml was assigned with "text/html" MIME type some where, override the application/x-httpd-shtml MIME type set in the so they are just served as regular static file.
  9. ShannonA

    ShannonA Well-Known Member

    Fair enough, but where would I look for that? I don't see any mime files except for the I noted (which seems to be set right), and the configuration is a largely standard one cloned off of the PHP_SuEXEC template.

    Is there somewhere else in the console? Something else?

  10. ShannonA

    ShannonA Well-Known Member

    OK, it looks like the culprit is somewhere in the old Apache files, which aren't turned off because a few older web sites still use them.

    I removed a few shtml -> text/html references, and that didn't do the job, which makes me wonder if there's some bug in the general apache conversion.

    However, when I turned off apache config entirely, it worked fine.

    So, I at least have an answer on my side, which is to move the rest of the old sites off apache and to turn off apache configuration entirely.


Share This Page