Secure logins + lighttpd


#1

Hello all,

Searched the 'net and list to no avail, hoping someone can help me. It
seems like this should be a HowTo, so maybe we can get this together
here
and I’ll write it up for the good of the people.

I’d like to provide secure logins for my users because clear text
passwords make the baby Jesus cry (as a friend of mine says). But, I
want
to provide everything else via standard http, all via lighttpd.

My machine is dinky and so I want to run just two dispatch.fcgi
processes
and one instance of lighttpd that handles both the ssl and clear traffic
lest I grind the disks to a horrible swap death.

Is this even possible, or must I run a separate lighttpd process for
providing logins via ssl? Any help is greatly appreciated, particularly
working config files :).

Thanks,

pt.


#2

Here’s my SSL config for the app:

$SERVER[“socket”] = “127.0.0.1:443” {
ssl.engine = “enable”
ssl.pemfile = “/home/pergesu/ssl/example.pem”
server.name = “example.com
server.document-root = “/home/pergesu/app/public/”
}

Also check the lighttpd site for a bit more info, as well as how to
generate self signed certificates [1].

I’m not sure if this is the totally appropriate way of doing things,
but it seems to be working perfectly fine for me.

Pat

[1] http://www.lighttpd.net/documentation/ssl.html


#3

That should be

$SERVER[“socket”] == “127.0.0.1:443” {

I had to type it, because I can’t figure out how to select and copy
with cygwin. I hate windows.

Pat


#4

Pat,

What I’d like to do is define in the came conf file two virtual host
entries, one for my http site, one for https (logins, registration,
etc),
that share dispatch.fcgi processes.

It looks like I would define listeners on 443/80 like so:


#5

I think you can just do this:


#6

Pat M. wrote:

I had to type it, because I can’t figure out how to select and copy
with cygwin. I hate windows.

For the ordinary (non-X) cygwin bash window, use the drop-down menu on
the top left icon in the title bar, select Edit, then select Mark.
Drag to select and highlight text (title bar shows “Select” while in
this mode). Drag again to reselect if need be. Double-click and
shift-selection work as you would expect.
Then choose Edit>Copy from the same menu, or just press Enter.

In terms of keyboard shortcuts:

Alt-space e k Enter

(This is the same as for a Windows command window).

If you have Cygwin with X, just dragging and highlighting text seems to
immediately place it on the Windows clipboard.

regards

Justin