Project

General

Profile

Lighttpd compatibility with OpenSSL

Added by arvind over 13 years ago

I have installed lighthttp 1.4.20 with SSL support(using openSSL 1.0.0). They were cross compiled for the arm platform. I was able to setup my webserver without SSL support. However when i enable SSL
by giving the ssl.engine="enable" and ssl.pemfile the webserver did not show up. I wanted to check if there were any known compatibility issues for the lighttpd with openssl. I would like to use TLS 1.0 feature for now (maybe TLS 1.1 in the future). Also could you suggest a version of openssl(0.98a-l)that is compatible with lighttpd 1.4.20.


Replies (10)

RE: Lighttpd compatibility with OpenSSL - Added by darix over 13 years ago

we would need more details.

start lighttpd with the -D parameter and also check the error log.

also... you have openssl 1.0.0 but use a reaaally old lighttpd version? we are at 1.4.29 now.

RE: Lighttpd compatibility with OpenSSL - Added by arvind over 13 years ago

2011-10-18 16:44:31: (log.c.97) server started
2011-10-18 16:44:31: (server.c.920) WARNING: unknown config-key: accesslog.filename (ignored)

This was what i got from the error log

RE: Lighttpd compatibility with OpenSSL - Added by nitrox over 13 years ago

Enabling mod_accesslog might help you with that one.

RE: Lighttpd compatibility with OpenSSL - Added by arvind over 13 years ago

Now the warning message is missing but the problem still persists

RE: Lighttpd compatibility with OpenSSL - Added by arvind over 13 years ago

I have now tried it with openssl 0.9.8k. The steps that i followed are
1. Cross compile openssl 0.9.8k for arm platform by editing the parameters CC,AR,ARD,OP,RANLIB in the makefile.This gave no errors or warnings
2. Then i ran make and make install
This gave no errors or warnings
3. Then i cross compiled lighttpd 1.4.20 for arm platform by configuring it enabling SSL
./configure CC= ..... with SSL and giving the ssl directories
This gave no errors or warnings
4. Then I ran make.
This gave no errors or warnings
5../lighttpd -V showed that it had SSL support(+)
6. I tried setting up a webserver using ssl.engine ="enable" and ssl.pemfile ='path to it'

After these steps the test.html works in http mode but not in https.
The log files show that the server has been started

Could you help me regarding this issue.

RE: Lighttpd compatibility with OpenSSL - Added by icy over 13 years ago

You use a long outdated version of lighty and your error description is "does not work". I fear because of that nobody will be able to help you.
Try an up to date version and give more details as to what exactly you see.

RE: Lighttpd compatibility with OpenSSL - Added by arvind over 13 years ago

@icy, In a quick setup I have set server.document-root = "/root/www/html/" in the lighttpd.conf. A test.html (with just "Hello world") is placed in /root/www/html/. In the conf file settings specific to ssl (ssl.engine, ssl.pemfile etc) are commented out. On browser, when I type http://<ip_address_of_target>/test.html, "Hello world" is displayed on browser as expected.

Later, in the conf file, ssl settings are enabled (ssl.engine ="enable", ssl.pemfile = "/etc/"), and a self generated server.pem is placed in /etc. On browser, when I type https://<ip_address_of_target>/test.html, no text is displayed and browser waits for long time and throws up this error: "Internet Explorer cannot display the webpage".

I tried lighttpd built for windows using same server.pem file and appropriately changing document root in server config file. Both http and https to requests displayed "Hello world" on browser as expected. In https, the browser text box turned red as this was self generated certificate.

I am wondering why the same version of lighttpd (1.4.20) and openssl (0.9.8) works on windows but not on the target (built for arm-linux platform).

Please let me know if I am missing something. Thanks in advance.

@darix, I am using 1.4.20 lighty due to legacy reasons. I do not want to disturb already working features in the legacy code (which has grown large over a period of time). I might update to latest version in some time future.

RE: Lighttpd compatibility with OpenSSL - Added by stbuehler over 13 years ago

i'm guessing (since you still don't show us your config file) that you failed to read the docs. lighttpd by default binds to port 80, whether you enable ssl or not- so you either have to enable ssl on an extra socket (read the docs!!!) or change the port to 443 or use https://...:80/.

RE: Lighttpd compatibility with OpenSSL - Added by arvind over 13 years ago

I have tried setting the port to 80 and 443.Neither of them made the https page load nor did https://...:80/

my lighttpd.conf file is as follows

server.modules = (
"mod_access",
"mod_cgi",
"mod_accesslog"
)

server.document-root = "/root/www/html/"
server.errorlog = "/var/log/lighttpd/error.log"
server.max-request-size = 40000
server.indexfiles = ( "index.php", "index.html",
"index.htm", "default.htm" )
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "audio/x-wav",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv"
)

accesslog.filename = "/var/log/lighttpd/access.log"

url.access-deny = ( "~", ".inc" )

cgi.assign = ( ".cgi" => "",
".pl" => "/usr/bin/perl",
".php" => "/usr/bin/php",
"/media" => "",
"/device_service" => "",
"/events" => "",
"/analytics" => "",
"/imaging" => "",
"/ptz" => "",
"/deviceio" => "" )

$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/server.pem"
}

server.upload-dirs = ( "/tmp" )

lighttpd.conf (7.82 KB) lighttpd.conf Conf file

RE: Lighttpd compatibility with OpenSSL - Added by arvind over 13 years ago

The problem was fixed, it was caused due to a network proxy. I was hosting the webserver on a 192.*.*.* ip address and did not give no proxy for https://192.*.*.* in the browser settings(only http://192.*.*.*).

It worked in windows because it was hosted on localhost 127.0.0.0 which has no proxy by default

Anyway thanks for all your support

    (1-10/10)