Skip to content

Instantly share code, notes, and snippets.

@domrim
Last active January 22, 2017 17:14
Show Gist options
  • Save domrim/c243a39d7f5ad86934d5d14ae9529504 to your computer and use it in GitHub Desktop.
Save domrim/c243a39d7f5ad86934d5d14ae9529504 to your computer and use it in GitHub Desktop.
nginx config for phpldapadmin in subdir of main-page. ssl-conf were made in the main part. php5handler goes on the php5-fpm socket. works also for phpmyadmin.
location /phpldapadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpldapadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass php5handler;
fastcgi_index index.php;
fastcgi_param HTTPS on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
auth_basic "phpldapadmin - Admin Bereich"
auth_basic_user_file /etc/nginx/.htpasswd_admin
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment