kakwa / ldapcherry

Web UI for managing users and groups in multiple directory services.
MIT License
225 stars 70 forks source link

fastcgi_option not working #8

Closed jeunito closed 7 years ago

jeunito commented 7 years ago

I used a fresh checkout and I get the following error when trying to run ldapcherry with fastcgi:

Python Exception:
Traceback (most recent call last):

  File "/home/ubuntu/ldapcherry/ldapcherry/exceptions.py", line 228, in ret
    return func(self, *args, **kwargs)

TypeError: default() takes at most 2 arguments (7 given)

uncaught exception: [default() takes at most 2 arguments (7 given)]

Command used:

sudo ldapcherryd -c conf/ldapcherry.ini -D -f

I used the ldapcherry.ini that came with the checkout but changed the following attributes:

# listing interface
server.socket_host = '0.0.0.0'

I also changed the templates and static dir attributes to point to the correct place for the Nginx configuration but I don't think that should matter.

kakwa commented 7 years ago

I've actually never deployed ldapcherry in fastcgi mode until now, I generally deploy it with a basic reverse http proxy.

But I managed to make it work with the following nginx configuration:

https://github.com/kakwa/ldapcherry/blob/master/goodies/nginx-fastcgi.conf

It's shamelessly copied/pasted from: http://webpy.org/cookbook/fastcgi-nginx

I've included this configuration in the documentation.

Also, just to mention it, you can also launch ldapcherry bound to a unix socket (in fact it's cherrypy that does all the work), but be cautious about the unix socket ownership:

# global parameters
[global]

# listing interface
server.socket_file = '/tmp/ldapcherry.sock'