Created
July 19, 2010 13:33
-
-
Save idan/481405 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream wsgidav { | |
server unix:/tmp/wsgidav.sock fail_timeout=0; | |
} | |
# non-HTTPS redirect elided... | |
server { | |
listen 443; | |
server_name dav.domain.com; | |
access_log /var/log/nginx/dav.domain.com.access.log; | |
error_log /var/log/nginx/dav.domain.com.error.log; | |
ssl on; | |
ssl_certificate /etc/ssl/localcerts/domain.com.pem; | |
ssl_certificate_key /etc/ssl/localcerts/domain.com.key; | |
keepalive_timeout 70; | |
add_header Front_End_Https on; | |
location / { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
if (!-f $request_filename) { | |
proxy_pass http://wsgidav; | |
break; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[program:wsgidav] | |
directory=/var/www/dav/server/ | |
command=/var/www/dav/server/bin/gunicorn wsgidav_gunicorn:app -b unix:/tmp/wsgidav.sock | |
user=www-data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from wsgidav.version import __version__ | |
from wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp | |
config = DEFAULT_CONFIG.copy() | |
config.update({ | |
"provider_mapping": {"/": r"/var/web/dav.domain.com/data"}, | |
"user_mapping": {'/': {'johnsmith': {'password': 'foobar', 'description': '', 'roles': []}}}, | |
"verbose": 1, | |
"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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment