Project

General

Profile

lighttpd.conf syntax documentation issue

Added by bradfordwetmore over 15 years ago

I've gone through the docs several times, I'm either missing something, or it's not discussed in the docs. I'm happy to RTFM, if I know where in the TFM. But for someone relatively new to the docs, please consider that what I noticed isn't intuitive.

Looking at the default config file, we see:

fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => "/var/run/lighttpd/php-fastcgi.socket",
                                   "bin-path" => "/usr/local/bin/php-cgi" 
                                 )
                               )
                            )

But when looking at the syntax in fastcgi module documentation (and others: proxy.server, etc), it doesn't mention "localhost" at all, rather just the double "(".

Docs:Configuration
Docs:ModFastCGI

From other spots around the net, I see that the "localhost" parameter can be replaced by 0 or some non-zero number of actual hostnames. But I don't think this is mentioned anywhere in the docs. All the docs show is:

fastcgi.server             = ( ".php" =>
                               ( (                                 (
                                   "socket" => "/var/run/lighttpd/php-fastcgi.socket",
                                   "bin-path" => "/usr/local/bin/php-cgi" 
                                 )
                               )
                            )

From the doc page, how are we supposed to know that hostnames could be there, or that the parameter is even optional? Are there other types of strings besides hostnames that can be here?

Thanks!


Replies (5)

RE: lighttpd.conf syntax documentation issue - Added by icy over 15 years ago

Actually that is just a name for the backend. You can then see the stats for it on the statistics page.
So it can be any string like "local-php-backend-1" or whatever you like.
The docs could be clearer on that one I guess.

RE: lighttpd.conf syntax documentation issue - Added by nitrox over 15 years ago

You can name your fastcgi.server which show up then at server-counters for easy recognition of which backends are used. E.g. fastcgi.backend.localhost.* if you put "localhost" there, or use php, ruby, or app-names like trac, redmine...

fastcgi.backend.php.*
fastcgi.backend.ruby.*
fastcgi.backend.<appname>

And add this to the wiki :-)

RE: lighttpd.conf syntax documentation issue - Added by bradfordwetmore over 15 years ago

Whoa...

Now that I understand what I'm looking at, I reread the fastcgi/proxy docs again and it's not clear that this "backend" param exists, or how to use/configure it clearly. It would be great if the docs (esp proxy/fastcgi/stats) could be expanded.

Also, right now there's nothing about proxy stats on the stats module page. Are there other modules which create stats?

I can help review whatever the team comes up with. Feel free to contact me via the email address I used to register.

Thanks for the explanation, and the tool itself.

Happy New Year!

RE: lighttpd.conf syntax documentation issue - Added by nitrox over 15 years ago

Thats the users job, so feel free to add it wherever this is not clear enough.

RE: lighttpd.conf syntax documentation issue - Added by bradfordwetmore over 15 years ago

I made an attempt at documenting this on the mod_proxy and mod_fastcgi pages. Feel free to correct if I said something incorrect.

I think we'll have to agree to disagree on whose "job" the docs are. Having an end user trying to describe the behaviour a developer implemented seems fraught with error.

Well, back to my real job. :)

    (1-5/5)