{"id":9190,"date":"2024-11-22T22:52:26","date_gmt":"2024-11-22T22:52:26","guid":{"rendered":"https:\/\/www.linuxandotherstuff.com\/?p=9190"},"modified":"2024-11-22T23:33:32","modified_gmt":"2024-11-22T23:33:32","slug":"webdav-cwp","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2024\/11\/22\/webdav-cwp\/","title":{"rendered":"Enable WebDav on CWP"},"content":{"rendered":"\n<p>After a lot of work I managed to install Nextcloud on CWP<\/p>\n\n\n\n<p>Here is the error I got:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"498\" src=\"https:\/\/qbytes.cloud\/wp-content\/uploads\/2024\/11\/2024-11-22-17-32-40-1024x498.png\" alt=\"\" class=\"wp-image-9199\" srcset=\"https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2024\/11\/2024-11-22-17-32-40-1024x498.png 1024w, https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2024\/11\/2024-11-22-17-32-40-300x146.png 300w, https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2024\/11\/2024-11-22-17-32-40-768x373.png 768w, https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2024\/11\/2024-11-22-17-32-40.png 1409w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Procedures performed:<\/p>\n\n\n\n<p>1) Rebuild Apache with the following added switches \u2013 you can use Apache 2.4.x<br>Add..<br>&#8211;enable-dav<br>&#8211;enable-dav-fs<br>&#8211;enable-dav-lock<br>&#8211;enable-auth-digest<br>&#8211;enable-authn-core<br>&#8211;enable-authz-core<\/p>\n\n\n\n<p>2) Enable the Apache modules: nano \/usr\/local\/apache\/conf\/httpd.conf<\/p>\n\n\n\n<p>LoadModule alias_module modules\/mod_alias.so<br>LoadModule authn_file_module modules\/mod_authn_file.so<br>LoadModule authn_core_module modules\/mod_authn_core.so<br>LoadModule authz_user_module modules\/mod_authz_user.so<br>LoadModule auth_digest_module modules\/mod_auth_digest.so<br>LoadModule dav_module modules\/mod_dav.so<br>LoadModule dav_fs_module modules\/mod_dav_fs.so<br>LoadModule dav_lock_module modules\/mod_dav_lock.so<br>LoadModule auth_digest_module modules\/mod_auth_digest.so<br>LoadModule setenvif_module modules\/mod_setenvif.so<br>LoadModule expires_module modules\/mod_expires.so<br>LoadModule headers_module modules\/mod_headers.so<br>Include conf\/extra\/httpd-dav.conf<\/p>\n\n\n\n<p>3) Restart Apache:<br>systemctl restart httpd<\/p>\n\n\n\n<p>4) Check for dav modules:<br>\/usr\/local\/apache\/bin\/httpd -M | grep -i dav<\/p>\n\n\n\n<p>The result should look like this:<\/p>\n\n\n\n<p>dav_module (shared)<br>dav_fs_module (shared)<br>dav_lock_module (shared)<\/p>\n\n\n\n<p>5) Edit your \u201chttpd-userdir.conf\u201d nano \/usr\/local\/apache\/conf\/extra\/httpd-userdir.conf<\/p>\n\n\n\n<p>\u2026replace everything in this file with the following text\u2026<\/p>\n\n\n\n<p>&lt;Directory &#8220;\/home\/*\/public_html&#8221;&gt;<br>AllowOverride FileInfo AuthConfig Limit Indexes<br>Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec<br>&lt;Limit GET POST OPTIONS&gt;<br>Order allow,deny<br>Allow from all<br>&lt;\/Limit&gt;<br>&lt;LimitExcept GET POST OPTIONS&gt;<br>Order deny,allow<br>Deny from all<br>&lt;\/LimitExcept&gt;<br>&lt;\/Directory&gt;<\/p>\n\n\n\n<p>6) Change the vhosts for nextcloud<br>Find your vhost file(s) (\/usr\/local\/apache\/conf.d\/vhosts) Modify both the ordinary vhost and the one marked \u201cssl\u201d if using an SSL certificate (which I advise\u2026)<\/p>\n\n\n\n<p>&lt;IfModule mod_rewrite.c&gt;<br>RewriteEngine on<br>RewriteRule ^\/ocm-provider \/<strong>Cloud<\/strong>\/ocm-provider\/ [R=301,L]<br>RewriteRule ^\/ocs-provider \/<strong>Cloud<\/strong>\/ocs-provider\/ [R=301,L]<br>RewriteRule ^\/\\.well-known\/carddav \/<strong>Cloud<\/strong>\/remote.php\/dav\/ [R=301,L]<br>RewriteRule ^\/\\.well-known\/caldav \/<strong>Cloud<\/strong>\/remote.php\/dav\/ [R=301,L]<br>&lt;\/IfModule&gt;<\/p>\n\n\n\n<p>7)<\/p>\n\n\n\n<p>Edit your Nextcloud .htaccess file<br>\u2026adding the following data to the end of the file:<\/p>\n\n\n\n<p>&lt;Limit GET POST&gt;<br>order deny,allow<br>allow from all<br>&lt;\/Limit&gt;<br>&lt;Limit PUT DELETE&gt;<br>order deny,allow<br>allow from all<br>&lt;\/Limit&gt;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/forum.centos-webpanel.com\/Smileys\/default\/cool.gif\" alt=\"8)\" title=\"Cool\"\/><\/figure>\n\n\n\n<p>&nbsp;The most important.<br>For me it only works when I disabled mod security in:<br>CWP &gt; Segurity &gt; Flap Accounts &gt; Disable.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Source: <a href=\"https:\/\/forum.centos-webpanel.com\/apache\/owncloud-needs-webdav\/\">https:\/\/forum.centos-webpanel.com\/apache\/owncloud-needs-webdav\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After a lot of work I managed to install Nextcloud on CWP Here is the error I got: Procedures performed: 1) Rebuild Apache with the following added switches \u2013 you can use Apache 2.4.xAdd..&#8211;enable-dav&#8211;enable-dav-fs&#8211;enable-dav-lock&#8211;enable-auth-digest&#8211;enable-authn-core&#8211;enable-authz-core 2) Enable the Apache modules: nano \/usr\/local\/apache\/conf\/httpd.conf LoadModule alias_module modules\/mod_alias.soLoadModule authn_file_module modules\/mod_authn_file.soLoadModule authn_core_module modules\/mod_authn_core.soLoadModule authz_user_module modules\/mod_authz_user.soLoadModule auth_digest_module modules\/mod_auth_digest.soLoadModule dav_module modules\/mod_dav.soLoadModule dav_fs_module &#8230; <a title=\"Enable WebDav on CWP\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2024\/11\/22\/webdav-cwp\/\" aria-label=\"Read more about Enable WebDav on CWP\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"class_list":["post-9190","post","type-post","status-publish","format-standard","hentry","category-nextcloud"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/9190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=9190"}],"version-history":[{"count":5,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/9190\/revisions"}],"predecessor-version":[{"id":9200,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/9190\/revisions\/9200"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=9190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=9190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=9190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}