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;

            ...
    }

The included config file uses PHP 5. In case you run with PHP 7 please update the parameter "fastcgi_pass" to "/var/run/php7-fpm.sock".

### 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/nginx.conf;

            ...
    }

The included config file uses PHP 7.0. In case you run with PHP 7.1 or PHP 5 please update the parameter "fastcgi_pass" to "/var/run/php/php7.1-fpm.sock".

### 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 (e.g. "/var/run/php5-fpm.sock" or "/var/run/php7-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;
        fastcgi_param SCRIPT_FILENAME $request_filename;
        include fastcgi_params;
      }

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

    }

Prev | Up | Next
Apache configuration | Home | WebAuthn/FIDO2