{"id":9,"date":"2004-07-21T19:57:31","date_gmt":"2004-07-21T16:57:31","guid":{"rendered":"http:\/\/void.gr\/kargig\/blog\/?p=9"},"modified":"2004-07-21T19:58:14","modified_gmt":"2004-07-21T16:58:14","slug":"webdav-mod_mysql_auth","status":"publish","type":"post","link":"https:\/\/www.void.gr\/kargig\/blog\/2004\/07\/21\/webdav-mod_mysql_auth\/","title":{"rendered":"WebDav + mod_mysql_auth ?"},"content":{"rendered":"<p>I have several users on an http server (apache of course) and they all have a seperate dir for <a href=\"http:\/\/www.webdav.org\/\">WebDav<\/a> . The authentication is being done using the default htaccess file-scheme. I want to change that and use <a href=\"http:\/\/www.heuer.org\/mod_auth_mysql\/\">mod_auth_mysql<\/a>. Searching google was not really helpfull. But I found a very interesting module called <a href=\"http:\/\/labs.genos.accio.com\/\">mod_auth_user_dir<\/a> for multiple webdav users (this sounds familiar!). It says it supports various authentication modules&#8230;I might try it if I can&#8217;t make mod_auth_mysql work on it&#8217;s own with webdav.<\/p>\n<p>What I&#8217;ve done so far is find how normal .htaccess authentication can be replaced with sql authentication.<br \/>\nHere&#8217;s a sample of an older .htaccess file and the newer one:<\/p>\n<blockquote><p><em>old<\/em><br \/>\n<code>AuthUserFile \/foo\/bar\/moo\/.htpasswd<br \/>\nAuthName \"lala la lalal\"<br \/>\nAuthType Basic<br \/>\n< limit GET ><br \/>\nrequire valid-user<br \/>\n< \/limit ><br \/>\n<\/><\/><\/code><\/p><\/blockquote>\n<blockquote><p><em>new<\/em><br \/>\n<code>AuthType Basic<br \/>\nAuthName \"lala la lalal\"<br \/>\nAuthMySQLHost localhost<br \/>\nAuthMySQLUser htpasswd<br \/>\nAuthMySQLPassword THATSMYSUPERSECRETPASSWORD<br \/>\nAuthMySQLDB htpasswd<br \/>\nAuthMySQLAuthoritative On<br \/>\nAuthMySQLKeepAlive On<br \/>\nrequire user MYUSER<br \/>\n<\/code><\/p><\/blockquote>\n<p>Why is it better ? <\/p>\n<li> More centralized (really helpfull if you have multiple servers and the same users all over)<\/li>\n<li> When you change one user it&#8217;s global and you don&#8217;t have to repeat the changes on every single host<\/li>\n<li> It&#8217;s faster <\/li>\n<li> I wanted to play with it <\/li>\n<p>Btw, there&#8217;s a great <a href=\"http:\/\/www.heuer.org\/mod_auth_mysql\/htpasswd\/htpasswd.tgz\">script<\/a> for automating the whole process of adding users, etc to the db.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have several users on an http server (apache of course) and they all have a seperate dir for WebDav . The authentication is being done using the default htaccess file-scheme. I want to change that and use mod_auth_mysql. Searching google was not really helpfull. But I found a very interesting module called mod_auth_user_dir for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9","post","type-post","status-publish","format-standard","hentry","category-general"],"aioseo_notices":[],"views":4199,"_links":{"self":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/comments?post=9"}],"version-history":[{"count":0,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/9\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/media?parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/categories?post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/tags?post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}