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
  • 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 | 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 2.5k 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 Away
      nebulonN Away
      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
                  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