# Ssl and lightpdd

**URL:** <https://www.ruby-forum.com/t/ssl-and-lightpdd/62897>\
**Category:** Rails\
**Created:** [June 9, 2006, 6:53am UTC](https://www.ruby-forum.com/t/ssl-and-lightpdd/62897 "2006-06-09T06:53:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rage989](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4af34b/32.png) [@rage989](https://www.ruby-forum.com/u/rage989)\
**Post date:** [June 9, 2006, 6:53am UTC](https://www.ruby-forum.com/t/ssl-and-lightpdd/62897/1 "2006-06-09T06:53:49Z")

</div>

can you run a site with ssl on a computer on a router or do you need a  
dedicated ip for this?

---

<div class="post-metadata">

**Author:** ![rage989](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4af34b/32.png) [@rage989](https://www.ruby-forum.com/u/rage989)\
**Post date:** [June 9, 2006, 9:41am UTC](https://www.ruby-forum.com/t/ssl-and-lightpdd/62897/2 "2006-06-09T09:41:06Z")

</div>

raj kapila wrote:

> can you run a site with ssl on a computer on a router or do you need a  
> dedicated ip for this?

I believe ssl requires a static IP. Not 100% sure of that however.

---

<div class="post-metadata">

**Author:** ![rage989](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4af34b/32.png) [@rage989](https://www.ruby-forum.com/u/rage989)\
**Post date:** [June 9, 2006, 8:35pm UTC](https://www.ruby-forum.com/t/ssl-and-lightpdd/62897/3 "2006-06-09T20:35:46Z")

</div>

Alex W. wrote:

> raj kapila wrote:
> 
> > can you run a site with ssl on a computer on a router or do you need a  
> > dedicated ip for this?
> 
> I believe ssl requires a static IP. Not 100% sure of that however.

Well my problem is that when i enable ssl in my lighttpd.conf file and i  
go to my site all i get is a blank page regardless if that page requires  
ssl.

---

<div class="post-metadata">

**Author:** ![rage989](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4af34b/32.png) [@rage989](https://www.ruby-forum.com/u/rage989)\
**Post date:** [June 9, 2006, 9:28pm UTC](https://www.ruby-forum.com/t/ssl-and-lightpdd/62897/4 "2006-06-09T21:28:44Z")

</div>

raj kapila wrote:

> Alex W. wrote:
> 
> > raj kapila wrote:
> > 
> > > can you run a site with ssl on a computer on a router or do you need a  
> > > dedicated ip for this?
> > 
> > I believe ssl requires a static IP. Not 100% sure of that however.
> 
> Well my problem is that when i enable ssl in my lighttpd.conf file and i  
> go to my site all i get is a blank page regardless if that page requires  
> ssl.

Since SSL runs on a different port (443), it requires a totally separate  
vhost.

here is my config for ssl, and non ssl vhosts:

# SSL

$SERVER[“socket”] == “70.87.55.194:443” {  
server.document-root = “/home/foobar/public/”

```
fastcgi.server = (
    ".fcgi" =>
      ( "localhost" =>
        (
          "socket" => 

```

“/home/lighttpd/var/run/lighttpd-fcgi-mwprod-ssl.socket”,  
“bin-path” =\> “/home/foobar/public/dispatch.fcgi”,  
“bin-environment” =\> ( “RAILS\_ENV” =\> “production” ),  
“max-load-per-proc” =\> 25,  
“min-procs” =\> 1,  
“max-procs” =\> 4,  
“idle-timeout” =\> 30  
)  
)  
)

```
#### SSL engine
ssl.engine = "enable"
ssl.pemfile = "/home/lighttpd/foobar.com.pem"

```

}

$HTTP[“host”] =~ “foobar” {  
server.document-root = “/home/foobar/public/”  
fastcgi.server = (  
“.fcgi” =\>  
( “localhost” =\>  
(  
“socket” =\>  
“/home/lighttpd/var/run/lighttpd-fcgi-mwprod.socket”,  
“bin-path” =\> “/home/foobar/public/dispatch.fcgi”,  
“bin-environment” =\> ( “RAILS\_ENV” =\> “production” ),  
“max-load-per-proc” =\> 25,  
“min-procs” =\> 1,  
“max-procs” =\> 4,  
“idle-timeout” =\> 30  
)  
)  
)  
}

hope it helps

---

<div class="post-metadata">

**Author:** ![rage989](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4af34b/32.png) [@rage989](https://www.ruby-forum.com/u/rage989)\
**Post date:** [June 9, 2006, 9:48pm UTC](https://www.ruby-forum.com/t/ssl-and-lightpdd/62897/5 "2006-06-09T21:48:51Z")

</div>

> Since SSL runs on a different port (443), it requires a totally separate  
> vhost.

can i do all this behind a router?

---

<div class="post-metadata">

**Author:** ![rage989](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4af34b/32.png) [@rage989](https://www.ruby-forum.com/u/rage989)\
**Post date:** [June 9, 2006, 11:51pm UTC](https://www.ruby-forum.com/t/ssl-and-lightpdd/62897/6 "2006-06-09T23:51:56Z")

</div>

got it working, thanks for you help. I am running behind a router too.  
most important part to lighttpd.conf is:

# SSL

$SERVER[“socket”] == “70.87.55.194:443” {  
server.document-root = “/home/foobar/public/”

```
fastcgi.server = (
    ".fcgi" =>
      ( "localhost" =>
        (
          "socket" =>

```

“/home/lighttpd/var/run/lighttpd-fcgi-mwprod-ssl.socket”,  
“bin-path” =\> “/home/foobar/public/dispatch.fcgi”,  
“bin-environment” =\> ( “RAILS\_ENV” =\> “production” ),  
“max-load-per-proc” =\> 25,  
“min-procs” =\> 1,  
“max-procs” =\> 4,  
“idle-timeout” =\> 30  
)  
)  
)

```
#### SSL engine
ssl.engine = "enable"
ssl.pemfile = "/home/lighttpd/foobar.com.pem"

```

}
