Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved .htacess in LAMP App using LDAP Authentication

    LAMP
    lamp apache ldap configuration
    3
    8
    243
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      RoboMod last edited by girish

      Hi there. I would like to use a .htaccess Protection in combination with the Cloudron LDAP. If I didn't miss it, the necessary modules are not loaded by the Apache config of the LAMP app. Would it be possible to active them?

      Best
      RoboMod

      1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff last edited by

        This will not really work, as the LAMP app also does not specify any authentication addons in the manifest like https://docs.cloudron.io/packaging/addons/#ldap to have access to the LDAP server.

        For this probably a custom fork of the LAMP app is doable to add the ldap module and also install the required apache modules then.

        The package repo can be found at https://git.cloudron.io/cloudron/lamp-app

        girish 1 Reply Last reply Reply Quote 0
        • Moved from Support by  nebulon nebulon 
        • girish
          girish Staff @nebulon last edited by

          @nebulon actually, the LAMP app does have ldap addon specified.

          @RoboMod I think it should work.

          R 1 Reply Last reply Reply Quote 0
          • R
            RoboMod @girish last edited by

            @girish Wuhu! Thats nice. Would you be willing to activate it in the next release or so? (I'm not sure which modules it would require exactly. But I could search them.)

            girish 1 Reply Last reply Reply Quote 0
            • girish
              girish Staff @RoboMod last edited by

              @RoboMod You mean activate the ldap module in apache?

              R 1 Reply Last reply Reply Quote 0
              • R
                RoboMod @girish last edited by RoboMod

                @girish Yes, exactly. I think the necessary modules would be:

                LoadModule ldap_module /path/to/mod_ldap.so
                LoadModule authnz_ldap_module /path/to/mod_authnz_ldap.so
                

                But I'm not 100% sure 😅

                girish 1 Reply Last reply Reply Quote 0
                • girish
                  girish Staff @RoboMod last edited by

                  @RoboMod In the latest package, I enabled the apache ldap modules. The config below works for me:

                      <Directory /app/data/public>
                          Options +FollowSymLinks
                  
                          AllowOverride None
                          Require valid-user
                          AuthName "Cloudron LDAP Authentication"
                          AuthBasicProvider ldap
                          AuthType Basic
                          AuthLDAPURL ${CLOUDRON_LDAP_URL}/${CLOUDRON_LDAP_USERS_BASE_DN}?username?sub?(username=*)
                          AuthLDAPBindDN ${CLOUDRON_LDAP_BIND_DN}
                          AuthLDAPBindPassword ${CLOUDRON_LDAP_BIND_PASSWORD}
                      </Directory>
                  

                  Also, documented in https://docs.cloudron.io/apps/lamp/#ldap

                  R 1 Reply Last reply Reply Quote 1
                  • R
                    RoboMod @girish last edited by

                    @girish That works great! Many many thanks for you prompt support!

                    1 Reply Last reply Reply Quote 0
                    • Topic has been marked as a question  nebulon nebulon 
                    • Topic has been marked as solved  nebulon nebulon 
                    • First post
                      Last post
                    Powered by NodeBB