Re: [us...@httpd] Apache + LDAP + DAV + homes without ~

2010-08-08 Thread Stefano Sasso
2010/8/3 Saxa Egea s...@saxa.dyndns.org:
  Dear all,

 I have compiled a httpd 2.2.16 with LDAP and DAV support running over SuSE
 linux.

 I'm trying to create a ftp like server through mod_dav. The authentication
 is made to a LDAP directory.
 I want to access with URL's like:

 http://servername/user1000/
 http://servername/user1001/
 http://servername/user1002/

 And just the user1000 should be able to access the user1000 directory, the
 user1001 its own user1001 directory, etc.

 I don't want to create a dedicated rule for each user/directory. And I don't
 want to use the ~ at the beginning of the URL.

I resolved a problem like this using only servername, without the /user1001.
I have a virtualhost dav.mydomain.com with DAV enabled for read-write
access, and a virtualhost, web.mydomain.com for read-only access,
without DAV. (the r-o access from web.mydomain is in
web.mydomain/user123 format).
The dav.mydomain configuration is like this:

VirtualHost 192.168.17.124
  ServerName dav.gnustile.lan
  ServerAlias dav.*
  DocumentRoot /srv/web

  Directory /srv/web
DAV On
Options Indexes
Options +FollowSymLinks
AllowOverride None
AuthType Basic
AuthName WebDAV
AuthUserFile /etc/apache2/vhost.dav
require valid-user
  /Directory
  RewriteEngine On
  RewriteCond %{REQUEST_URI} !^/icons/
  RewriteRule ^/(.*) /srv/web/%{LA-U:REMOTE_USER}/$1
  Location /icons
LimitExcept GET
  deny from all
/LimitExcept
  /Location
# ...
/VirtualHost

bye,
stefano

-- 
Stefano Sasso
http://stefano.dscnet.org/

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Userid and reverse proxy

2009-05-27 Thread Stefano Sasso
2009/5/27 Efjestad, Dag dag.efjes...@solvea.no:
    Location /kongsberg
        AuthType basic
        AuthName Requierd users
        AuthUserFile conf/basicauth.sec
        Require user user1 user2 user3
    /Location
    ProxyRequests    Off
    ProxyPass        /kongsberg/ http://aeoas02/kongsberg/%AuthenticatedUserId%
    ProxyPassReverse /kongsberg/ http://aeoas02/kongsberg/%AuthenticatedUserId%


 The variabel %AuthenticatedUserId% should contain user1, user2 or user3.

 Anyone know a way of solving this problem?

you can try with mod_rewrite and [P]:

RewriteEngine On
RewriteRule ^/kongsberg(.*) http://aeoas02/kongsberg/%{LA-U:REMOTE_USER}$1 [P,L]

bye,
-- 
Stefano Sasso
stesa...@gmail.com
http://www.gnustile.net/

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Userid and reverse proxy

2009-05-27 Thread Stefano Sasso
2009/5/27 Efjestad, Dag dag.efjes...@solvea.no:
 I tried several options but no value in remote_user.

did you try with LA-U? from apache mod_rewrite docs:

For instance, to rewrite according to the REMOTE_USER variable from
within the per-server context (httpd.conf file) you must use
%{LA-U:REMOTE_USER} - this variable is set by the authorization
phases, which come after the URL translation phase (during which
mod_rewrite operates).

bye,
-- 
Stefano Sasso
stesa...@gmail.com
http://www.gnustile.net/

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [EMAIL PROTECTED] Apache + Perl and PHP

2006-11-07 Thread Stefano Sasso

2006/11/6, Spartanicus [EMAIL PROTECTED]:

Options ExecCGI


you have to add
AddHandler cgi-script .pl
to your apache config file.

bye
stefano

--
Stefano Sasso
[EMAIL PROTECTED]
Linux User #330315
http://www.gnustile.net.org/

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
 from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] LocationMatch and DirectoryMatch regex

2006-11-06 Thread Stefano Sasso

2006/11/3, Joshua Slive [EMAIL PROTECTED]:

No.  Sometimes you can use mod_rewrite to enforce similar
restrictions, but you can't, in general, use wildcards like that.


thanks.
I've resolved using mod_rewrite. here the solution:

RewriteEngine On
RewriteRule ^/(.*) /srv/web/%{LA-U:REMOTE_USER}/$1

Directory /srv/web
DAV On
Options Indexes
Options +FollowSymLinks
AllowOverride None
AuthType Basic
AuthName WebDAV
AuthUserFile /etc/apache2/vhost.dav
require valid-user
/Directory

bye
Stefano S.

--
---
Per favore non mandate allegati in Word o PowerPoint.
Si veda http://www.fsf.org/philosophy/no-word-attachments.html
---
Stefano Sasso
[EMAIL PROTECTED]
Linux User #330315
http://www.gnustile.net.org/

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
 from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] LocationMatch and DirectoryMatch regex

2006-11-03 Thread Stefano Sasso

Hi everybody, someone knows if is it possible to work with
regex-variables in LocationMatch or DirectoryMatch?

for exampe, I have this situation:

Alias /dav /srv/webhome

then every user can access via webdav on his own home dir only
Location /dav/customer1
...
DAV On
require user customer1
...
/Location
Location /dav/customer2
...
DAV On
require user customer2
...
/Location

is it possibile to have something similar, but with no need of
restarting apache every time a user is added?
is it possible to have something like:
LocationMatch /dav/([a-zA-Z0-9]*)/
...
DAV On
require user $1 # or something like this
...
/LocationMatch

thanks
Stefano

--
Stefano Sasso
[EMAIL PROTECTED]
Linux User #330315
http://www.gnustile.net.org/

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
 from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]