SSI in LS4?

ShannonA

Well-Known Member
#1
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.
mime.properties:html, htm = application/x-httpd-shtml
mime.properties:shtml = application/x-httpd-shtml
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 ...
 

ShannonA

Well-Known Member
#3
I've tried changing html back to text/html, but it's still broken.
atropos:/opt/lsws/conf# grep html mime.properties
html, htm = text/html
xhtml, xht = application/xhtml+xml
shtml = application/x-httpd-shtml
I'm doing these changes to the mime.properties 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:
WARN [] can't set 'Forced Type', undefined MIME Type handler/perl-script
But there's no perl-script in the mime.properties file:
atropos:/opt/lsws/conf# grep -i perl mime.properties
atropos:/opt/lsws/conf#
 

ShannonA

Well-Known Member
#5
turn on debug logging and check the log.
It requires Apache style configuration



to turn it on.
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.

Thanks!
 

mistwang

LiteSpeed Staff
#6
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
Server Side Include is disabled
in the error.log at INFO level.

Are you using latest version 4.2.7?
 

ShannonA

Well-Known Member
#7
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?
4.2.6 which is still listed as the latest release in our control panel:

Latest Release
Release Action
4.2.6
I restarted the server with logs set to INFO and don't see anything:
atropos:/var/log/lsws# !g
grep -i "Server Side Include" error.log
Here's a page that I believe was working prior to the changeover to LS config:
http://www.rpg.net/news+reviews/columns/virtually14feb03.shtml
 

mistwang

LiteSpeed Staff
#8
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 mime.properties. so they are just served as regular static file.
 

ShannonA

Well-Known Member
#9
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 mime.properties. so they are just served as regular static file.
Fair enough, but where would I look for that? I don't see any mime files except for the mime.properties 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?

Thanks.
 

ShannonA

Well-Known Member
#10
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.

Thanks.
 
Top