Nginx configuration
Prev | Appendix B. Security | Next

## Nginx configuration

There is no fully automatic setup of Nginx but LAM provides a ready-to-use configuration file.

### RPM based installations

The RPM package has dependencies on Apache. Therefore, Nginx is not officially supported with this installation mode. Use tar.bz2 if you are unsure.

However, the package also includes an Nginx configuration file. Please include it in your server directive like this:

    server {
            ...

            include /etc/ldap-account-manager/lam.nginx.conf;

            ...
    }

### DEB based installations

The LAM installation package ships with an Nginx configuration file. Please include it in your server directive like this:

    server {
            ...

            include /etc/ldap-account-manager/lam.nginx.conf;

            ...
    }

### tar.bz2 based installations

Please add the following configuration snippet to your server directive.

You will need to change the alias location ("/usr/share/ldap-account-manager") and fastcgi_pass ("/var/run/php5-fpm.sock") to match your installation.

    location /lam {
      index index.html;
      alias /usr/share/ldap-account-manager;
      autoindex off;

      location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
      }

      location ~ /lam/(tmp/internal|sess|config|lib|help|locale) {
        deny all;
        return 403;
      }

    }

Prev | Up | Next
Apache configuration | Home | Appendix C. Typical OpenLDAP settings