Annotation of wikisrc/tutorials/lighttpd_on_netbsd.mdwn, revision 1.4

1.1       sevan       1: **Contents**
                      2: 
                      3: [[!toc]]
                      4: 
1.4     ! schmonz     5: ## Prelude
1.1       sevan       6: 
1.4     ! schmonz     7: How to deploy a high performance webserver using NetBSD and Lighttpd.
1.1       sevan       8: 
1.4     ! schmonz     9: ## Installation
        !            10: 
        !            11: Via `pkgin` or `pkg_add` for platforms with binary packages available, or via pkgsrc thus:
1.1       sevan      12: 
1.2       wiki       13:     $ cd /usr/pkgsrc/www/lighttpd
                     14:     $ make install clean clean-depends
1.1       sevan      15: 
                     16: 
1.2       wiki       17: If you don’t have `PKG_RCD_SCRIPTS=yes` set, manually install the provided rc.d script:
1.4     ! schmonz    18: 
1.2       wiki       19:     # cp /usr/pkg/share/examples/rc.d/lighttpd /etc/rc.d
1.1       sevan      20: 
1.2       wiki       21: And set `lighttpd=YES` in `/etc/rc.conf`.
1.1       sevan      22: 
                     23: 
1.4     ! schmonz    24: ## Configuration
        !            25: 
        !            26: Enable kqueue:
        !            27: 
        !            28:     server.event-handler        = "kqueue"
1.2       wiki       29:     server.stat-cache-engine    = "kqueue"
1.1       sevan      30: 
                     31: 
1.4     ! schmonz    32: ## Testing the setup
        !            33: 
        !            34: You can start the webserver with:
        !            35: 
1.1       sevan      36:     /etc/rc.d/lighttpd start
                     37: 
1.4     ! schmonz    38: Check your logs if you encounter any problem.
        !            39: 
        !            40: ## Setting up authentication
1.1       sevan      41: 
1.4     ! schmonz    42: ### Directory server
1.1       sevan      43: 
1.4     ! schmonz    44: We will use OpenLdap.
1.1       sevan      45: 
1.4     ! schmonz    46: First of all deploy a working ldap server, and populate it with the the users. For more information on this, read [[OpenLDAP Authentication on NetBSD|tutorials/openldap_authentication_on_netbsd]].
1.1       sevan      47: 
1.4     ! schmonz    48: Be sure to load mod_auth and include the following in your lighttpd.conf file:
1.1       sevan      49: 
                     50:     # ldap authentication
                     51:     auth.backend               = "ldap"
1.4     ! schmonz    52:     
1.1       sevan      53:     auth.backend.ldap.hostname = "grimnismal.local"
                     54:     auth.backend.ldap.base-dn  = "dc=grimnismal,dc=local"
                     55:     auth.backend.ldap.filter   = "(uid=$)"
1.4     ! schmonz    56:     
1.1       sevan      57:     auth.backend.ldap.bind-dn  = "cn=Manager,dc=grimnismal,dc=local"
                     58:     
                     59:     # passwd for bind-dn, separated for security reasons
                     60:     # contains: auth.backend.ldap.bind-pw  = "your-password"
1.2       wiki       61:     # It must NOT be world readable!
1.1       sevan      62:     #
                     63:     include "ldapsecret"
1.4     ! schmonz    64:     
1.1       sevan      65:     auth.require               = ( "/server-status" =>
                     66:                                    (
                     67:                                      "method"  => "basic",
                     68:                                      "realm"   => "Admin only page",
                     69:                                      "require" => "user=replaced"
                     70:                                    ),
                     71:                                    "/server-config" =>
                     72:                                    (
1.4     ! schmonz    73:                                      "method"  => "basic",    
1.1       sevan      74:                                      "realm"   => "Staff only page",
1.4     ! schmonz    75:                                      "require" => "valid-user"
1.1       sevan      76:                                    )
                     77:                                  )

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb