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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. LAMP
  3. .htacess in LAMP App using LDAP Authentication

.htacess in LAMP App using LDAP Authentication

Scheduled Pinned Locked Moved Solved LAMP
lampapacheldapconfiguration
8 Posts 3 Posters 4.9k Views 3 Watching
  • 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 Offline
    R Offline
    RoboMod
    wrote on last edited by girish
    #1

    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
    0
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      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

      girishG 1 Reply Last reply
      0
      • nebulonN nebulon moved this topic from Support on
      • nebulonN nebulon

        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

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #3

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

        @RoboMod I think it should work.

        R 1 Reply Last reply
        0
        • girishG girish

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

          @RoboMod I think it should work.

          R Offline
          R Offline
          RoboMod
          wrote on last edited by
          #4

          @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.)

          girishG 1 Reply Last reply
          0
          • R RoboMod

            @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.)

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #5

            @RoboMod You mean activate the ldap module in apache?

            R 1 Reply Last reply
            0
            • girishG girish

              @RoboMod You mean activate the ldap module in apache?

              R Offline
              R Offline
              RoboMod
              wrote on last edited by RoboMod
              #6

              @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 😅

              girishG 1 Reply Last reply
              0
              • R 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 😅

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #7

                @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
                2
                • girishG girish

                  @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 Offline
                  R Offline
                  RoboMod
                  wrote on last edited by
                  #8

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

                  1 Reply Last reply
                  0
                  • nebulonN nebulon marked this topic as a question on
                  • nebulonN nebulon has marked this topic as solved on

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Bookmarks
                  • Search