FilesystemProvider url path for shares behind a specific mount_path problem in Apache + mod_wsgi

72 views
Skip to first unread message

Roberto Rossi

unread,
Mar 7, 2014, 9:01:21 AM3/7/14
to wsg...@googlegroups.com
First of all, thanks for this great piece of software!

I'm trying to use it behind Apache + mod_wsgi .
I mapped the Wsgi application behind the /dav/ path , using this file wsgi:

from wsgidav.fs_dav_provider import FilesystemProvider
from wsgidav.version import __version__
from wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp

__docformat__ = "reStructuredText"

#rootpath = gettempdir()
rootpath = "/home/roberto/Desktop/wsgidav_testshare"
provider = FilesystemProvider(rootpath)

rootpath2 = "/home/roberto/Desktop/Foto Claudia"
provider2 = FilesystemProvider(rootpath2)

config = DEFAULT_CONFIG.copy()
config.update({
    "mount_path" : "dav",
    "provider_mapping": {"/path1": provider, "/path2": provider2},
    "user_mapping": {},
    "verbose": 0,
    #"verbose": 1,
    #"host": "0.0.0.0",
    #"port": "80",
    "enable_loggers": [],
    "propsmanager": True,      # True: use property_manager.PropertyManager                   
    "locksmanager": True,      # True: use lock_manager.LockManager                  
    "domaincontroller": None,  # None: domain_controller.WsgiDAVDomainController(user_mapping)
    })
app = WsgiDAVApp(config)

def application(environ, start_response):
    return app(environ, start_response)


and this entry inside the Apache configuration file:

WSGIScriptAlias /dav /home/roberto/programs/www/dav/_dav.wsgi

The startup of WsgiDAV seems ok but the resource hrefs are written duplicating the path: /dav/path1/dav/path1/<file>
for every resource. Both for resource and for collections.

Is a mine miconfiguration of a bug in url construction?

Thanks for your support!

ROb

Roberto Rossi

unread,
Mar 7, 2014, 11:59:20 AM3/7/14
to wsg...@googlegroups.com
Maybe I found my problem.

The "mount_path" configuration key should start with / , so in my example configuration: /dav .
Now the url are created with fullpath /dav/path1/ and 
/dav/path2/ .

ROb
Reply all
Reply to author
Forward
0 new messages