Configure Seaside + Pier + lighttpd

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Configure Seaside + Pier + lighttpd

Mariano Martinez Peck
Hi folks!  I have a website which is in development with pier. As it is in development there was no lighttpd or apache and I wanted them to wait :)  But...In another thread of this mail, thanks John, I just realised that I want to configure my lighttpd with Pier now. The problem is that I know very little about lighttpd neither apache. I want to use lighttpd. But I don't know how to configure.

I saw Miguel (Miguel pensé mandarte un mail privado pero aprovecho que tal vez le sirve a otro) post here: http://miguel.leugim.com.mx/index.php/2008/09/27/gemstones-and-fastcgi-with-lighttpd/
and I wonder which is the difference between what configuration and the one I need for my pier site. I remove Gemstone and FastCGI from that post but I add Pier hahah.

I also saw http://www.piercms.com/doc/deploy but I am using lighttpd :(

I have lighttpd installed and listening. I am under Ubuntu 8.10.

I want to statically serve:

- My pictures -> I use the gallery plugins. I have those photos in /var/www/pictures
- All css files. I have my own library for my website which has a stylesheet. But, what about the others css? should I serve ALL of them ?
Would love to have them in /var/www/styles/
- All javascript files. The same as above. All js of all libraries ?
Would love to have them in /var/www/javascripts/
- What about the files I upload in Pier and are stored in  ~/files
Would love to have them in /var/www/pierFiles

Thanks a lot for the help!

Mariano


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Configure Seaside + Pier + lighttpd

Miguel Cobá
El mié, 15-07-2009 a las 01:32 -0300, Mariano Martinez Peck escribió:

> Hi folks!  I have a website which is in development with pier. As it
> is in development there was no lighttpd or apache and I wanted them to
> wait :)  But...In another thread of this mail, thanks John, I just
> realised that I want to configure my lighttpd with Pier now. The
> problem is that I know very little about lighttpd neither apache. I
> want to use lighttpd. But I don't know how to configure.
>
> I saw Miguel (Miguel pensé mandarte un mail privado pero aprovecho que
> tal vez le sirve a otro) post here:
> http://miguel.leugim.com.mx/index.php/2008/09/27/gemstones-and-fastcgi-with-lighttpd/
> and I wonder which is the difference between what configuration and
> the one I need for my pier site. I remove Gemstone and FastCGI from
> that post but I add Pier hahah.
>
> I also saw http://www.piercms.com/doc/deploy but I am using
> lighttpd :(
>
> I have lighttpd installed and listening. I am under Ubuntu 8.10.
>
> I want to statically serve:
>
> - My pictures -> I use the gallery plugins. I have those photos
> in /var/www/pictures
> - All css files. I have my own library for my website which has a
> stylesheet. But, what about the others css? should I serve ALL of
> them ?
> Would love to have them in /var/www/styles/
> - All javascript files. The same as above. All js of all libraries ?
> Would love to have them in /var/www/javascripts/
> - What about the files I upload in Pier and are stored in  ~/files
> Would love to have them in /var/www/pierFiles
>
> Thanks a lot for the help!

> Mariano
Hola Mariano,

this is what I have in a site in production right now (it is not
complete):

$HTTP["host"] == "mysite.com" {
  $HTTP["scheme"] == "http" {
    url.redirect = ( "^/(.*)" => "https://mysite.com/$1" )
  }
}
$SERVER["socket"] == "123.123.123.123:443" {
  ssl.engine = "enable"
  ssl.pemfile = "/etc/lighttpd/ssl/mysite.com/mysite.com.pem"
  ssl.ca-file = "/etc/lighttpd/ssl/mysite.com/gd_bundle.crt"

  server.name = "mysite.com"
  server.document-root = "/srv/www/mysite.com/"

  # We'll use the resources directory to host static files: images,
styles, etc

  # Rewrite the URL
  url.rewrite-once = (
    "^/resources/(.*)" => "$0",        # Unaltered
    "^/about/(.*)" => "$0",        # Unaltered
    "^/(.*)" => "/seaside/myApp$1"   # Rewritten
  )

  # Anything with seaside/myApp pass to Seaside on port 8080
  proxy.balance = "hash"
  proxy.server = (
    "/seaside/myApp" => (
      ( "host" => "127.0.0.1", "port" => 8080)
    )
  )
}
$HTTP["host"] == "blog.mysite.com" {
  server.document-root = "/srv/www/blog.mysite.com/"
  alias.url = ( "/wp-uploads/" =>
"/srv/www/wp-uploads/blog.mysite.com/" )
}

For this I have everything on https and several folders are served
direct from disk on the document root from the lighttpd.
Also, you can have a lot more sites in the same server without problem,
just like the wordpress blog section.

For your case you need something like:

server.document-root = “/var/www/”

$HTTP["host"] == "yoursite.com" {

  # We'll use the resources directory to host static files: images,
styles, etc

  # Rewrite the URL
  url.rewrite-once = (
    "^/pictures/(.*)" => "$0",        # Unaltered
    "^/styles/(.*)" => "$0",        # Unaltered
    "^/javascripts/(.*)" => "$0",        # Unaltered
    "^/styles/(.*)" => "$0",        # Unaltered
    "^/files/(.*)" => "$0",        # Unaltered
    "^/(.*)" => "/seaside/myApp$1"   # Rewritten
  )

  # Anything with seaside/mySite pass to Seaside on port 8080
  proxy.balance = "hash"
  proxy.server = (
    "/seaside/myApp" => (
      ( "host" => "127.0.0.1", "port" => 8080)
    )
  )
}


For the files/ folder I don't know. According to the pier instructions,
the squeak files are stored on /srv/site/ (or /site/srv/, the
instructions have a typo, but imagine that it is /srv/site/)

So you have:

/srv/site/

and

/srv/site/files

The apache config proxy everything that doesn't exist on seaside/files/
to seaside. That is the reason for the document root for apache
in /srv/site/files/

But in the lighttpd example that I show the logic is, if it is a
specific folder, serve it directly and if it has seaside on it proxy to
seaside.

Anyway, give a couple hours and I'll send the equivalent exact and
complete config file for lighttpd and pier.

Miguel Cobá



_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Configure Seaside + Pier + lighttpd

Mariano Martinez Peck


2009/7/15 Miguel Enrique Cobá Martinez <[hidden email]>
El mié, 15-07-2009 a las 01:32 -0300, Mariano Martinez Peck escribió:
> Hi folks!  I have a website which is in development with pier. As it
> is in development there was no lighttpd or apache and I wanted them to
> wait :)  But...In another thread of this mail, thanks John, I just
> realised that I want to configure my lighttpd with Pier now. The
> problem is that I know very little about lighttpd neither apache. I
> want to use lighttpd. But I don't know how to configure.
>
> I saw Miguel (Miguel pensé mandarte un mail privado pero aprovecho que
> tal vez le sirve a otro) post here:
> http://miguel.leugim.com.mx/index.php/2008/09/27/gemstones-and-fastcgi-with-lighttpd/
> and I wonder which is the difference between what configuration and
> the one I need for my pier site. I remove Gemstone and FastCGI from
> that post but I add Pier hahah.
>
> I also saw http://www.piercms.com/doc/deploy but I am using
> lighttpd :(
>
> I have lighttpd installed and listening. I am under Ubuntu 8.10.
>
> I want to statically serve:
>
> - My pictures -> I use the gallery plugins. I have those photos
> in /var/www/pictures
> - All css files. I have my own library for my website which has a
> stylesheet. But, what about the others css? should I serve ALL of
> them ?
> Would love to have them in /var/www/styles/
> - All javascript files. The same as above. All js of all libraries ?
> Would love to have them in /var/www/javascripts/
> - What about the files I upload in Pier and are stored in  ~/files
> Would love to have them in /var/www/pierFiles
>
> Thanks a lot for the help!

> Mariano
Hola Mariano,

this is what I have in a site in production right now (it is not
complete):

$HTTP["host"] == "mysite.com" {
 $HTTP["scheme"] == "http" {
   url.redirect = ( "^/(.*)" => "https://mysite.com/$1" )
 }
}
$SERVER["socket"] == "123.123.123.123:443" {
 ssl.engine = "enable"
 ssl.pemfile = "/etc/lighttpd/ssl/mysite.com/mysite.com.pem"
 ssl.ca-file = "/etc/lighttpd/ssl/mysite.com/gd_bundle.crt"

 server.name = "mysite.com"
 server.document-root = "/srv/www/mysite.com/"

 # We'll use the resources directory to host static files: images,
styles, etc

 # Rewrite the URL
 url.rewrite-once = (
   "^/resources/(.*)" => "$0",        # Unaltered
   "^/about/(.*)" => "$0",        # Unaltered
   "^/(.*)" => "/seaside/myApp$1"   # Rewritten
 )

 # Anything with seaside/myApp pass to Seaside on port 8080
 proxy.balance = "hash"
 proxy.server = (
   "/seaside/myApp" => (
     ( "host" => "127.0.0.1", "port" => 8080)
   )
 )
}
$HTTP["host"] == "blog.mysite.com" {
 server.document-root = "/srv/www/blog.mysite.com/"
 alias.url = ( "/wp-uploads/" =>
"/srv/www/wp-uploads/blog.mysite.com/" )
}

For this I have everything on https and several folders are served
direct from disk on the document root from the lighttpd.
Also, you can have a lot more sites in the same server without problem,
just like the wordpress blog section.

For your case you need something like:

server.document-root = “/var/www/”

$HTTP["host"] == "yoursite.com" {

 # We'll use the resources directory to host static files: images,
styles, etc

 # Rewrite the URL
 url.rewrite-once = (
   "^/pictures/(.*)" => "$0",        # Unaltered
   "^/styles/(.*)" => "$0",        # Unaltered
   "^/javascripts/(.*)" => "$0",        # Unaltered
   "^/styles/(.*)" => "$0",        # Unaltered
   "^/files/(.*)" => "$0",        # Unaltered
   "^/(.*)" => "/seaside/myApp$1"   # Rewritten
 )

 # Anything with seaside/mySite pass to Seaside on port 8080
 proxy.balance = "hash"
 proxy.server = (
   "/seaside/myApp" => (
     ( "host" => "127.0.0.1", "port" => 8080)
   )
 )
}


For the files/ folder I don't know. According to the pier instructions,
the squeak files are stored on /srv/site/ (or /site/srv/, the
instructions have a typo, but imagine that it is /srv/site/)

So you have:

/srv/site/

and

/srv/site/files

The apache config proxy everything that doesn't exist on seaside/files/
to seaside. That is the reason for the document root for apache
in /srv/site/files/

But in the lighttpd example that I show the logic is, if it is a
specific folder, serve it directly and if it has seaside on it proxy to
seaside.

Anyway, give a couple hours and I'll send the equivalent exact and
complete config file for lighttpd and pier.

Miguel: it seems you know a lot about this :)  Nice explanation.
I will start playing a bit with this and see what happens.
Of course if you send me the example would be a dream, but I cannot give you a couple of hours but a couple of days even weeks if you want!!!

Thanks a lot man.

Mariano

 

Miguel Cobá





_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Configure Seaside + Pier + lighttpd

Mariano Martinez Peck
Ok...I have been thinking a bit how my configuration should be and of course, I have a coupe of questions.

How I enter my seaside application right now: http://localhost:8888/seaside/destinoMochila

What is my seaside configuration in http://localhost:8080/seaside/config

Resource Base Url: (unspecified)   
Server Hostname: (unspecified)   
Server Path: (unspecified)   
Server Port: 80
Server Protocol: #http

How my saeside webapp get the css and javacript? because I am using a custom library.



What I think I shoud do is:


server.document-root = “/var/www/”

# If the site is destinoMochila
$HTTP["host"] == "www.destinomochila.com.ar" {

    # The document root will be replaced by a new one.
    server.document-root = "/var/www/destinoMochila/"

    # We'll use the resources directory to host static files: images,styles, etc

     # Rewrite the URL
     url.rewrite-once = (
       "^/pictures/(.*)" => "$0",        # Unaltered
       "^/styles/(.*)" => "$0",        # Unaltered
       "^/javascripts/(.*)" => "$0",        # Unaltered
       "^/files/(.*)" => "$0",        # Unaltered
       "^/(.*)" => "/seaside/destinoMochila$1"   # Rewritten
     )

     # Anything with seaside/destinoMochila pass to Seaside on port 8888
     proxy.balance = "hash"
     proxy.server = (
       "/seaside/destinoMochila" => (
         ( "host" => "127.0.0.1", "port" => 8888)
       )
     )
}


Create the following folders and files:

/var/www/destinoMochila/pictures/
/var/www/destinoMochila/styles/
/var/www/destinoMochila/javascripts/

/site/srv/destinoMochila/pier.image
/site/srv/destinoMochila/pier.changes
/site/srv/destinoMochila/files/*
/site/srv/destinoMochila/SqueakV39.sources


Now....questions:

1) Resource Base Url: should this be / ?
2) Server Hostname: should this be www.destinomochila.com.ar ?
3) Server Path: should this be / ?
4) I think my lighttpd conf file is wrong with the /files because it is not in /var/www/destinoMochila/ but in /site/srv/destinoMochila/
is this wrong? how should be correct?  can I us ln ?
5) Once I have this working....what should I do with my DestinoMochilaLibrary? It shouldn't be used any more, isn't it ? I have to remove all the Libraries from http://localhost:8888/seaside/config/destinoMochila  ???


Thanks a lor for the help!!!!

Mariano


2009/7/16 Mariano Martinez Peck <[hidden email]>


2009/7/15 Miguel Enrique Cobá Martinez <[hidden email]>

El mié, 15-07-2009 a las 01:32 -0300, Mariano Martinez Peck escribió:
> Hi folks!  I have a website which is in development with pier. As it
> is in development there was no lighttpd or apache and I wanted them to
> wait :)  But...In another thread of this mail, thanks John, I just
> realised that I want to configure my lighttpd with Pier now. The
> problem is that I know very little about lighttpd neither apache. I
> want to use lighttpd. But I don't know how to configure.
>
> I saw Miguel (Miguel pensé mandarte un mail privado pero aprovecho que
> tal vez le sirve a otro) post here:
> http://miguel.leugim.com.mx/index.php/2008/09/27/gemstones-and-fastcgi-with-lighttpd/
> and I wonder which is the difference between what configuration and
> the one I need for my pier site. I remove Gemstone and FastCGI from
> that post but I add Pier hahah.
>
> I also saw http://www.piercms.com/doc/deploy but I am using
> lighttpd :(
>
> I have lighttpd installed and listening. I am under Ubuntu 8.10.
>
> I want to statically serve:
>
> - My pictures -> I use the gallery plugins. I have those photos
> in /var/www/pictures
> - All css files. I have my own library for my website which has a
> stylesheet. But, what about the others css? should I serve ALL of
> them ?
> Would love to have them in /var/www/styles/
> - All javascript files. The same as above. All js of all libraries ?
> Would love to have them in /var/www/javascripts/
> - What about the files I upload in Pier and are stored in  ~/files
> Would love to have them in /var/www/pierFiles
>
> Thanks a lot for the help!

> Mariano
Hola Mariano,

this is what I have in a site in production right now (it is not
complete):

$HTTP["host"] == "mysite.com" {
 $HTTP["scheme"] == "http" {
   url.redirect = ( "^/(.*)" => "https://mysite.com/$1" )
 }
}
$SERVER["socket"] == "123.123.123.123:443" {
 ssl.engine = "enable"
 ssl.pemfile = "/etc/lighttpd/ssl/mysite.com/mysite.com.pem"
 ssl.ca-file = "/etc/lighttpd/ssl/mysite.com/gd_bundle.crt"

 server.name = "mysite.com"
 server.document-root = "/srv/www/mysite.com/"

 # We'll use the resources directory to host static files: images,
styles, etc

 # Rewrite the URL
 url.rewrite-once = (
   "^/resources/(.*)" => "$0",        # Unaltered
   "^/about/(.*)" => "$0",        # Unaltered
   "^/(.*)" => "/seaside/myApp$1"   # Rewritten
 )

 # Anything with seaside/myApp pass to Seaside on port 8080
 proxy.balance = "hash"
 proxy.server = (
   "/seaside/myApp" => (
     ( "host" => "127.0.0.1", "port" => 8080)
   )
 )
}
$HTTP["host"] == "blog.mysite.com" {
 server.document-root = "/srv/www/blog.mysite.com/"
 alias.url = ( "/wp-uploads/" =>
"/srv/www/wp-uploads/blog.mysite.com/" )
}

For this I have everything on https and several folders are served
direct from disk on the document root from the lighttpd.
Also, you can have a lot more sites in the same server without problem,
just like the wordpress blog section.

For your case you need something like:

server.document-root = “/var/www/”

$HTTP["host"] == "yoursite.com" {

 # We'll use the resources directory to host static files: images,
styles, etc

 # Rewrite the URL
 url.rewrite-once = (
   "^/pictures/(.*)" => "$0",        # Unaltered
   "^/styles/(.*)" => "$0",        # Unaltered
   "^/javascripts/(.*)" => "$0",        # Unaltered
   "^/styles/(.*)" => "$0",        # Unaltered
   "^/files/(.*)" => "$0",        # Unaltered
   "^/(.*)" => "/seaside/myApp$1"   # Rewritten
 )

 # Anything with seaside/mySite pass to Seaside on port 8080
 proxy.balance = "hash"
 proxy.server = (
   "/seaside/myApp" => (
     ( "host" => "127.0.0.1", "port" => 8080)
   )
 )
}


For the files/ folder I don't know. According to the pier instructions,
the squeak files are stored on /srv/site/ (or /site/srv/, the
instructions have a typo, but imagine that it is /srv/site/)

So you have:

/srv/site/

and

/srv/site/files

The apache config proxy everything that doesn't exist on seaside/files/
to seaside. That is the reason for the document root for apache
in /srv/site/files/

But in the lighttpd example that I show the logic is, if it is a
specific folder, serve it directly and if it has seaside on it proxy to
seaside.

Anyway, give a couple hours and I'll send the equivalent exact and
complete config file for lighttpd and pier.

Miguel: it seems you know a lot about this :)  Nice explanation.
I will start playing a bit with this and see what happens.
Of course if you send me the example would be a dream, but I cannot give you a couple of hours but a couple of days even weeks if you want!!!

Thanks a lot man.

Mariano

 

Miguel Cobá






_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Configure Seaside + Pier + lighttpd

Mariano Martinez Peck
In reply to this post by Miguel Cobá


2009/7/15 Miguel Enrique Cobá Martinez <[hidden email]>
El mié, 15-07-2009 a las 01:32 -0300, Mariano Martinez Peck escribió:
> Hi folks!  I have a website which is in development with pier. As it
> is in development there was no lighttpd or apache and I wanted them to
> wait :)  But...In another thread of this mail, thanks John, I just
> realised that I want to configure my lighttpd with Pier now. The
> problem is that I know very little about lighttpd neither apache. I
> want to use lighttpd. But I don't know how to configure.
>
> I saw Miguel (Miguel pensé mandarte un mail privado pero aprovecho que
> tal vez le sirve a otro) post here:
> http://miguel.leugim.com.mx/index.php/2008/09/27/gemstones-and-fastcgi-with-lighttpd/
> and I wonder which is the difference between what configuration and
> the one I need for my pier site. I remove Gemstone and FastCGI from
> that post but I add Pier hahah.
>
> I also saw http://www.piercms.com/doc/deploy but I am using
> lighttpd :(
>
> I have lighttpd installed and listening. I am under Ubuntu 8.10.
>
> I want to statically serve:
>
> - My pictures -> I use the gallery plugins. I have those photos
> in /var/www/pictures
> - All css files. I have my own library for my website which has a
> stylesheet. But, what about the others css? should I serve ALL of
> them ?
> Would love to have them in /var/www/styles/
> - All javascript files. The same as above. All js of all libraries ?
> Would love to have them in /var/www/javascripts/
> - What about the files I upload in Pier and are stored in  ~/files
> Would love to have them in /var/www/pierFiles
>
> Thanks a lot for the help!

> Mariano
Hola Mariano,

this is what I have in a site in production right now (it is not
complete):

$HTTP["host"] == "mysite.com" {
 $HTTP["scheme"] == "http" {
   url.redirect = ( "^/(.*)" => "https://mysite.com/$1" )
 }
}
$SERVER["socket"] == "123.123.123.123:443" {
 ssl.engine = "enable"
 ssl.pemfile = "/etc/lighttpd/ssl/mysite.com/mysite.com.pem"
 ssl.ca-file = "/etc/lighttpd/ssl/mysite.com/gd_bundle.crt"

 server.name = "mysite.com"
 server.document-root = "/srv/www/mysite.com/"

 # We'll use the resources directory to host static files: images,
styles, etc

 # Rewrite the URL
 url.rewrite-once = (
   "^/resources/(.*)" => "$0",        # Unaltered
   "^/about/(.*)" => "$0",        # Unaltered
   "^/(.*)" => "/seaside/myApp$1"   # Rewritten
 )

 # Anything with seaside/myApp pass to Seaside on port 8080
 proxy.balance = "hash"
 proxy.server = (
   "/seaside/myApp" => (
     ( "host" => "127.0.0.1", "port" => 8080)
   )
 )
}
$HTTP["host"] == "blog.mysite.com" {
 server.document-root = "/srv/www/blog.mysite.com/"
 alias.url = ( "/wp-uploads/" =>
"/srv/www/wp-uploads/blog.mysite.com/" )
}

For this I have everything on https and several folders are served
direct from disk on the document root from the lighttpd.
Also, you can have a lot more sites in the same server without problem,
just like the wordpress blog section.

For your case you need something like:

server.document-root = “/var/www/”

$HTTP["host"] == "yoursite.com" {

 # We'll use the resources directory to host static files: images,
styles, etc

 # Rewrite the URL
 url.rewrite-once = (
   "^/pictures/(.*)" => "$0",        # Unaltered
   "^/styles/(.*)" => "$0",        # Unaltered
   "^/javascripts/(.*)" => "$0",        # Unaltered
   "^/styles/(.*)" => "$0",        # Unaltered
   "^/files/(.*)" => "$0",        # Unaltered
   "^/(.*)" => "/seaside/myApp$1"   # Rewritten
 )


Miguel: I am trying to see how to make it work but then I read in the documentation of mod_rewrite this: "NOTE: url rewriting does not work within a $HTTP["url"] conditional. "

In this case, the rewrite is within that conditional. I am right?

thanks!

Mariano
 


 # Anything with seaside/mySite pass to Seaside on port 8080
 proxy.balance = "hash"
 proxy.server = (
   "/seaside/myApp" => (
     ( "host" => "127.0.0.1", "port" => 8080)
   )
 )
}


For the files/ folder I don't know. According to the pier instructions,
the squeak files are stored on /srv/site/ (or /site/srv/, the
instructions have a typo, but imagine that it is /srv/site/)

So you have:

/srv/site/

and

/srv/site/files

The apache config proxy everything that doesn't exist on seaside/files/
to seaside. That is the reason for the document root for apache
in /srv/site/files/

But in the lighttpd example that I show the logic is, if it is a
specific folder, serve it directly and if it has seaside on it proxy to
seaside.

Anyway, give a couple hours and I'll send the equivalent exact and
complete config file for lighttpd and pier.

Miguel Cobá





_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Configure Seaside + Pier + lighttpd

Miguel Cobá
El lun, 20-07-2009 a las 14:14 -0100, Mariano Martinez Peck escribió:

>
>
> 2009/7/15 Miguel Enrique Cobá Martinez <[hidden email]>
>         El mié, 15-07-2009 a las 01:32 -0300, Mariano Martinez Peck
>         escribió:
>        
>         > Hi folks!  I have a website which is in development with
>         pier. As it
>         > is in development there was no lighttpd or apache and I
>         wanted them to
>         > wait :)  But...In another thread of this mail, thanks John,
>         I just
>         > realised that I want to configure my lighttpd with Pier now.
>         The
>         > problem is that I know very little about lighttpd neither
>         apache. I
>         > want to use lighttpd. But I don't know how to configure.
>         >
>         > I saw Miguel (Miguel pensé mandarte un mail privado pero
>         aprovecho que
>         > tal vez le sirve a otro) post here:
>         >
>         http://miguel.leugim.com.mx/index.php/2008/09/27/gemstones-and-fastcgi-with-lighttpd/
>         > and I wonder which is the difference between what
>         configuration and
>         > the one I need for my pier site. I remove Gemstone and
>         FastCGI from
>         > that post but I add Pier hahah.
>         >
>         > I also saw http://www.piercms.com/doc/deploy but I am using
>         > lighttpd :(
>         >
>         > I have lighttpd installed and listening. I am under Ubuntu
>         8.10.
>         >
>         > I want to statically serve:
>         >
>         > - My pictures -> I use the gallery plugins. I have those
>         photos
>         > in /var/www/pictures
>         > - All css files. I have my own library for my website which
>         has a
>         > stylesheet. But, what about the others css? should I serve
>         ALL of
>         > them ?
>         > Would love to have them in /var/www/styles/
>         > - All javascript files. The same as above. All js of all
>         libraries ?
>         > Would love to have them in /var/www/javascripts/
>         > - What about the files I upload in Pier and are stored in
>          ~/files
>         > Would love to have them in /var/www/pierFiles
>         >
>         > Thanks a lot for the help!
>        
>         > Mariano
>        
>         Hola Mariano,
>        
>         this is what I have in a site in production right now (it is
>         not
>         complete):
>        
>         $HTTP["host"] == "mysite.com" {
>          $HTTP["scheme"] == "http" {
>            url.redirect = ( "^/(.*)" => "https://mysite.com/$1" )
>          }
>         }
>         $SERVER["socket"] == "123.123.123.123:443" {
>          ssl.engine = "enable"
>          ssl.pemfile = "/etc/lighttpd/ssl/mysite.com/mysite.com.pem"
>          ssl.ca-file = "/etc/lighttpd/ssl/mysite.com/gd_bundle.crt"
>        
>          server.name = "mysite.com"
>          server.document-root = "/srv/www/mysite.com/"
>        
>          # We'll use the resources directory to host static files:
>         images,
>         styles, etc
>        
>          # Rewrite the URL
>          url.rewrite-once = (
>            "^/resources/(.*)" => "$0",        # Unaltered
>            "^/about/(.*)" => "$0",        # Unaltered
>            "^/(.*)" => "/seaside/myApp$1"   # Rewritten
>          )
>        
>          # Anything with seaside/myApp pass to Seaside on port 8080
>          proxy.balance = "hash"
>          proxy.server = (
>            "/seaside/myApp" => (
>              ( "host" => "127.0.0.1", "port" => 8080)
>            )
>          )
>         }
>         $HTTP["host"] == "blog.mysite.com" {
>          server.document-root = "/srv/www/blog.mysite.com/"
>          alias.url = ( "/wp-uploads/" =>
>         "/srv/www/wp-uploads/blog.mysite.com/" )
>         }
>        
>         For this I have everything on https and several folders are
>         served
>         direct from disk on the document root from the lighttpd.
>         Also, you can have a lot more sites in the same server without
>         problem,
>         just like the wordpress blog section.
>        
>         For your case you need something like:
>        
>         server.document-root = “/var/www/”
>        
>         $HTTP["host"] == "yoursite.com" {
>        
>          # We'll use the resources directory to host static files:
>         images,
>         styles, etc
>        
>          # Rewrite the URL
>          url.rewrite-once = (
>            "^/pictures/(.*)" => "$0",        # Unaltered
>            "^/styles/(.*)" => "$0",        # Unaltered
>            "^/javascripts/(.*)" => "$0",        # Unaltered
>            "^/styles/(.*)" => "$0",        # Unaltered
>            "^/files/(.*)" => "$0",        # Unaltered
>            "^/(.*)" => "/seaside/myApp$1"   # Rewritten
>          )
>
>
> Miguel: I am trying to see how to make it work but then I read in the
> documentation of mod_rewrite this: "NOTE: url rewriting does not work
> within a $HTTP["url"] conditional. "
>

It is within a conditional but not a "url" conditional, with a "socket",
"host" and others, the rewrite works without problem.

Miguel Cobá

> In this case, the rewrite is within that conditional. I am right?
>
> thanks!
>
> Mariano
>  
>        
>        
>          # Anything with seaside/mySite pass to Seaside on port 8080
>          proxy.balance = "hash"
>          proxy.server = (
>            "/seaside/myApp" => (
>              ( "host" => "127.0.0.1", "port" => 8080)
>            )
>          )
>         }
>        
>        
>         For the files/ folder I don't know. According to the pier
>         instructions,
>         the squeak files are stored on /srv/site/ (or /site/srv/, the
>         instructions have a typo, but imagine that it is /srv/site/)
>        
>         So you have:
>        
>         /srv/site/
>        
>         and
>        
>         /srv/site/files
>        
>         The apache config proxy everything that doesn't exist on
>         seaside/files/
>         to seaside. That is the reason for the document root for
>         apache
>         in /srv/site/files/
>        
>         But in the lighttpd example that I show the logic is, if it is
>         a
>         specific folder, serve it directly and if it has seaside on it
>         proxy to
>         seaside.
>        
>         Anyway, give a couple hours and I'll send the equivalent exact
>         and
>         complete config file for lighttpd and pier.
>        
>         Miguel Cobá
>        
>        
>        
>

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki