 |
Linode.com Forum Linode Community Forums
|
| Author |
Message |
hybinet
Joined: 02 May 2008
Posts: 40
|
| Posted: Sun May 25, 2008 12:14 am Post subject: lighttpd and server-side includes |
|
|
Hi, I'm trying out lighttpd as a possible replacement for Apache. Thanks to all the tutorials that are out there in the web, I finally got it running -- fastcgi with individual permissions and all. The only problem I'm having is that I just can't get server-side includes to work.
I'm using Ubuntu 8.04 with lighttpd 1.4.19 (latest stable release).
Both of the following lines are in my config file, which means that server-side includes are enabled:
Code: server.modules = ( ..., "mod_ssi", ... )
ssi.extension = ( "shtml" )
More accurately, they're in a config file which is linked from the main config file, and which is also a symlink to another file. But I know that this config file is being used by lighty, because if I put garbage in it, lighty would throw an error. I also tried moving the directives to the main config file, with no effect whatsoever.
The file containing the ssi directive is named "index.shtml", and the directive itself is:
Code: <!--#include file="cpright.html"-->
Now, when I point my browser to index.shtml, and view the source code, the line above (the ssi directive) appears as part of the source code, whereas it's supposed to have been replaced by the contents of cpright.html.
The file cpright.html exists in the same directory, and it is readable by the lighttpd user. But there is no sign in the access log / error log that lighty has ever looked up that file.
I've spent some time Googling, and it seems that lighty won't parse ssi includes if the included file also contains ssi includes. This is not the case with my site. cpright.html is just a plain html file with some copyright and contact information which I stick into every page of the site. The exact same files worked flawlessly in Apache.
Of course I've tried restarting / reloading lighttpd a number of times.
According to The following thread, this seems to be a recognized bug, but I'm surprised at the lack of any other information on this problem. Are lighty folks too sophisticated to care about primitive stuff like ssi at all?
http://trac.lighttpd.net/trac/ticket/1101
Any help would be appreciated. |
|
| Back to top |
|
Jay
Joined: 14 Nov 2004
Posts: 125
Location: NC, USA
|
| Posted: Sun May 25, 2008 8:54 am Post subject: |
|
|
| I absolutely love Lighttpd, but I don't know anything about your issue. I do, however, have it working with php as a fastcgi :) |
|
| Back to top |
|
oliver
Joined: 02 Apr 2008
Posts: 16
|
| Posted: Sun May 25, 2008 5:09 pm Post subject: |
|
|
| if you're looking for a (light-weight) apache replacement have a look at nginx. it can do fastcgi, ssi an all that and is tiny compared to apache (and easy to set up). |
|
| Back to top |
|
nix
Joined: 27 Jun 2008
Posts: 3
|
| Posted: Sun Jun 29, 2008 5:30 am Post subject: |
|
|
That should work. I'm using Lighttpd 1.4.19 on Debian and your code example works when I'm using the same configuration as above. Do you get the same result if you move your SSI configuration into your main configuration file?
If you installed it using apt you could also try to compile it yourself and override your old version and see if that helps. |
|
| Back to top |
|
| |
|