LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-26-2005, 06:07 AM   #1
deoren
Member
 
Registered: Oct 2003
Location: USA
Distribution: Ubuntu
Posts: 216

Rep: Reputation: 30
mod_auth_ldap + mass hosting


First of all thanks for reading this.

Second, I searched the forums here and via Google but didn't come up with anything very helpful.

Here is my current setup:

Code:
<VirtualHost *:80>

    UseCanonicalName off
    ServerName yourfiles.examplesite.org
    ServerAdmin webmaster@_nospam_examplesite.org
    DocumentRoot /var/www/examplesite.org/yourfiles
    CustomLog /var/www/examplesite.org/logs/yourfiles.access.log combined
    ErrorLog /var/www/examplesite.org/logs/yourfiles.error.log

    <Directory /var/www/examplesite.org/yourfiles>
        <IfModule mod_access.c>
            Order allow,deny
            Allow from all
        </IfModule>
    </Directory>

    <Directory /var/www/examplesite.org/yourfiles/john>
        Options Indexes
        IndexOptions +IgnoreCase +FoldersFirst +FancyIndexing +XHTML
        AllowOverride None


        # Enable DAV support for this directory
        DAV On

        <IfModule mod_access.c>
            Order allow,deny
            Allow from all
        </IfModule>

        AuthName "NAS"
        AuthType Basic
        AuthLDAPAuthoritative on
        AuthLDAPEnabled on
        AuthLDAPUrl ldap://localhost:389/cn=web,ou=users,ou=examplesite.org,ou=domains,o=examplesite?uid

        # DO NOT remove "GET" from the line below, as general web access requires that.  The others are used by WebDAV.
        <Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
            Require user john
        </Limit>
    </Directory>

    <Directory /var/www/examplesite.org/yourfiles/sally>
        Options Indexes
        IndexOptions +IgnoreCase +FoldersFirst +FancyIndexing +XHTML
        AllowOverride None

        # Enable DAV support for this directory
        DAV On

        <IfModule mod_access.c>
            Order allow,deny
            Allow from all
        </IfModule>

        AuthName "NAS"
        AuthType Basic
        AuthLDAPAuthoritative on
        AuthLDAPEnabled on
        AuthLDAPUrl ldap://localhost:389/cn=web,ou=users,ou=examplesite.org,ou=domains,o=examplesite?uid

        # DO NOT remove "GET" from the line below, as general web access requires that.  The others are used by WebDAV.
        <Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
            Require user sally
        </Limit>
    </Directory>
</VirtualHost>
That vhost setup works without issues.

The "issue" is when I have say 100 users: I don't want to repeat the directory "block" 100 times.

Instead of this:


Code:
    <Directory /var/www/examplesite.org/yourfiles/sally>
        Options Indexes
        IndexOptions +IgnoreCase +FoldersFirst +FancyIndexing +XHTML
        AllowOverride None

        # Enable DAV support for this directory
        DAV On

        <IfModule mod_access.c>
            Order allow,deny
            Allow from all
        </IfModule>

        AuthName "NAS"
        AuthType Basic
        AuthLDAPAuthoritative on
        AuthLDAPEnabled on
        AuthLDAPUrl ldap://localhost:389/cn=web,ou=users,ou=examplesite.org,ou=domains,o=examplesite?uid

        # DO NOT remove "GET" from the line below, as general web access requires that.  The others are used by WebDAV.
        <Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
            Require user sally
        </Limit>
    </Directory>
I would like to have something like this once in the config file:

Code:
<Directory /var/www/examplesite.org/yourfiles/$uid>
        Options Indexes
        IndexOptions +IgnoreCase +FoldersFirst +FancyIndexing +XHTML
        AllowOverride None

        # Enable DAV support for this directory
        DAV On

        <IfModule mod_access.c>
            Order allow,deny
            Allow from all
        </IfModule>

        AuthName "NAS"
        AuthType Basic
        AuthLDAPAuthoritative on
        AuthLDAPEnabled on
        AuthLDAPUrl ldap://localhost:389/cn=web,ou=users,ou=examplesite.org,ou=domains,o=examplesite?uid

        # DO NOT remove "GET" from the line below, as general web access requires that.  The others are used by WebDAV.
        <Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
            Require user sally
        </Limit>
    </Directory>
Where $uid is the username they enter when prompted for a user/pass.

Is there a way to do that with mod_userdir?

Thanks.
 
Old 07-26-2005, 09:14 AM   #2
deoren
Member
 
Registered: Oct 2003
Location: USA
Distribution: Ubuntu
Posts: 216

Original Poster
Rep: Reputation: 30
Quote:
Is there a way to do that with mod_userdir?
Heh, is there a way to do this at all?
 
Old 07-27-2005, 01:00 PM   #3
deoren
Member
 
Registered: Oct 2003
Location: USA
Distribution: Ubuntu
Posts: 216

Original Poster
Rep: Reputation: 30
*bump*
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unix hosting Vs windows hosting the_imax Linux - Networking 2 07-24-2004 01:47 PM
mod_auth_ldap leandrop Linux - Software 0 06-14-2004 08:30 AM
AS3-mod_auth_ldap w/apache2 r_morris Red Hat 0 03-24-2004 10:51 AM
Mass log out. Thrifty Linux - General 2 02-16-2004 03:53 PM
Mass Rename wickdgin Linux - Newbie 2 04-13-2003 02:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration