LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-03-2009, 08:22 AM   #1
tpe
Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Rep: Reputation: 16
Apache 2.2 and LDAP Based home directories


Dear all,
I have a RHEL 5 Web Server based on Apache 2.2
I need to offer the user's web pages in the web via the classic form http://users.example.com/~username

All users are located in an openLDAP server. The users are not locally installed. I cannot use the classic approach of UserDir=/home/*/public_html, because:
  • User directories are in the form /home_usr/department/1/2/3/username
  • 1,2 are the departments' subdepartments
    [3] is the 1st letter of user's last name.
So, for Sales - Wholesales - East dpt user jim, his homedirectory is:
Code:
/home_usr/sales/wholesales/east/j/jim
and his html pages should be at
Code:
/home_usr/sales/wholesales/j/jim/www
So, the UserDir=/home/*/public_html is not a usable approach by me.

I tries the mod_userdir_ldap from http://www.horde.net/~jwm/software/mod_ldap_userdir/, but it's not working! It does not even go to openLDAP Server.

Some of my the httpd.conf lines, are:
Code:
LoadModule actions_module modules/mod_actions.so
LoadModule include_module modules/mod_include.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule ldap_userdir_module modules/mod_ldap_userdir.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule mime_module modules/mod_mime.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule dir_module modules/mod_dir.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule env_module modules/mod_env.so

<VirtualHost _default_:80>
        DirectoryIndex index.php index.html index.htm
        LogLevel debug
        HostNameLookups Off
        DocumentRoot /nfs/web/
        ServerName users.domain.com
        ErrorLog logs/users_pages-error.log
        CustomLog logs/users_pages-access.log common
        ServerSignature Off

        LDAPUserDir "www"
        LDAPUserDirServer 192.168.10.10
        LDAPUserDirDNInfo cn=www,ou=read,ou=groups,ou=ldap,ou=config,dc=example,dc=com ldapuserpass
        LDAPUserDirBaseDN dc=example,dc=com
        LDAPUserDirSearchScope subtree
        LDAPUserDirUseTLS off
        LDAPUserDirCacheTimeout 300
</VirtualHost>
When I try the http://users.domain.com/~jim I have the following error:
Code:
[Fri Jul 03 15:40:46 2009] [error] [client 192.168.0.211] File does not exist: /nfs/web/~jim
As far as I understand, Apache does not translate the "~" as an attempt to find the user's in LDAP! To support this, when the URL: http://users.example.com/~tpe (my home page, on the local disk not on the LDAP), returned the correct index.html page!
So, my questions are:
1. Can I enable a more detailed log?
2. What do I do wrong?

Thank you in advance,
Peter
 
  


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
Apache redirect based on LDAP authentication starmonche Linux - Server 3 03-21-2008 10:42 AM
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 02:37 PM
Samba PDC+LDAP and home directories on different servers Neruocomp Linux - Networking 0 07-13-2006 01:56 PM
OpenLDAP, Apache, Home directories paul_mat Linux - Networking 1 03-30-2006 12:20 AM
apache login to home directories paul_mat Linux - Networking 1 04-05-2005 02:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:47 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