Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've setup a SSL certificate on lighttpd, on Ubuntu 10.

The issue is that when I try to access to I get "impossible to connect". If I use, it works perfectly.

This is my configuration file:

$HTTP["host"] == "XXX.XXX.95.175:443" {

  ssl.engine = "enable" = "/var/ssl/gd_bundle.crt"
  ssl.pemfile = "/var/ssl/"


$HTTP["host"] =~ "(^|\.)mydomain\.com$" {
  server.document-root = "/var/www/path/to/website"

I have double checked I've done all necessary steps.

My domain correctly points to the ip XXX.XXX.95.175 (i've checked by pinging it).

Lighttpd is compiled with ssl: lighttpd-1.4.6 (ssl) - a light and fast webserver What's wrong ? thanks

share|improve this question
if you're hosting on linux can you do a "netstat -an | grep 443"? You should see a tcp port 443 open. on windows just do a netstat -an. – Marm0t Nov 11 '10 at 21:12
@Marm0t Indeed no results. I need to open port 443 I guess.. how – Patrick Nov 11 '10 at 21:15
up vote 1 down vote accepted

You need a $SERVER["socket"] rather than $HTTP["host"]

$SERVER["socket"] does double duty for telling lighttpd what sockets to listen on as well as what to do when someone connects to it.

The SSL configuration guide here goes into more detail, including using $HTTP["scheme"] to tell whether the browser is using https or not (but you'll need to upgrade to at least 1.4.16... even Debian Lenny is at 1.4.19, you really need to upgrade)

share|improve this answer
I dunno how is possible I've copied pasted lighttpd-1.4.6.. I've run few seconds ago and it is lighttpd-1.4.19 (ssl). So I guess it is updated. thanks – Patrick Nov 11 '10 at 21:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.