Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4124338
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:43:41+00:00 2026-05-20T23:43:41+00:00

I am attempting to setup a webdav website for various clients to upload/download files.

  • 0

I am attempting to setup a webdav website for various clients to upload/download files. However I don’t want each client to see the other clients’ data. Each client uses SSL client certificates to authenticate, so I would like to chroot them into their own directory tree.

For example:

  • https://example.com/webdav/upload
  • Should map to filesystem location
  • /somewebroot/webdav/SSL_USERNAME/upload

I thought that I could use mod_rewrite for this but my rules seem to send me into an infinite redirection loop. Any thoughts?

Alias /webdav /somewebroot/webdav
<Directory /somewebroot/webdav>
    RewriteEngine On
    RewriteBase /webdav

    RewriteCond %{SSL:SSL_CLIENT_S_DN_CN} ADMIN #The admin does not get chrooted
    RewriteRule .* - [L]

    RewriteCond %{REQUEST_URI} !^%{SSL:SSL_CLIENT_S_DN_CN}/(.*)
    RewriteRule ^(.*) %{SSL:SSL_CLIENT_S_DN_CN}/$1 [L]
</Directory>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:43:41+00:00Added an answer on May 20, 2026 at 11:43 pm

    The fix for this is fairly simple once you figure out that “RewriteCond” does not support server variables in the PATTERN. So you have to get it into the pattern by using a backreference. Also “RewriteCond” does not use the “RewriteBase” directive so you also have to take that into account as well.

    Alias /webdav /somewebroot/webdav
    <Directory /somewebroot/webdav>
        RewriteEngine On
        RewriteBase /webdav
    
        RewriteCond %{SSL:SSL_CLIENT_S_DN_CN} ADMIN #The admin does not get chrooted
        RewriteRule .* - [L]
    
        RewriteCond %{SSL:SSL_CLIENT_S_DN_CN}::%{REQUEST_URI} !^(.*)::/webdav/\1/(.*)
        RewriteRule ^(.*) %{SSL:SSL_CLIENT_S_DN_CN}/$1 [L]
    </Directory>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to setup a retweet button with some pre-written post text. However I
I am attempting to make a maven parent pom setup where I don't have
I am attempting to setup Team Foundation server, however I am running into a
I am attempting to setup Symfony2 on an Ubuntu virtual host. However even the
I am attempting to setup a DataGridView on a form so that the row
I am attempting to a get a isolated build environment setup in my dev
I am attempting to drop and recreate a database from my CI setup. But
Say - anyone attempted to setup Ogre in Eclipse on Ubuntu? I'm attempting to
I'm attempting to setup svn on my home network on an Ubuntu server box.
I'm attempting to setup a MenuItem that will have a submenu of page numbers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.