This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages: [1]
1
Apache / Re: OwnCloud needs webDAV
« on: July 30, 2020, 05:21:51 PM »
I will report the problem I had and how I solved it.
After a lot of work I managed to install Nextcloud 19.
Procedures performed:
1) Rebuild Apache with the following added switches – you can use Apache 2.4.x
Add..
--enable-dav
--enable-dav-fs
--enable-dav-lock
--enable-auth-digest
--enable-authn-core
--enable-authz-core
2) Enable the Apache modules: nano /usr/local/apache/conf/httpd.conf
LoadModule alias_module modules/mod_alias.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dav_lock_module modules/mod_dav_lock.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
Include conf/extra/httpd-dav.conf
3) Restart Apache:
systemctl restart httpd
4) Check for dav modules:
/usr/local/apache/bin/httpd -M | grep -i dav
The result should look like this:
dav_module (shared)
dav_fs_module (shared)
dav_lock_module (shared)
5) Edit your “httpd-userdir.conf” nano /usr/local/apache/conf/extra/httpd-userdir.conf
…replace everything in this file with the following text…
<Directory "/home/*/public_html">
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
6) Change the vhosts for nextcloud
Find your vhost file(s) (/usr/local/apache/conf.d/vhosts) Modify both the ordinary vhost and the one marked “ssl” if using an SSL certificate (which I advise…)
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/ocm-provider /Cloud/ocm-provider/ [R=301,L]
RewriteRule ^/ocs-provider /Cloud/ocs-provider/ [R=301,L]
RewriteRule ^/\.well-known/carddav /Cloud/remote.php/dav/ [R=301,L]
RewriteRule ^/\.well-known/caldav /Cloud/remote.php/dav/ [R=301,L]
</IfModule>
7)
Edit your Nextcloud .htaccess file
…adding the following data to the end of the file:
<Limit GET POST>
order deny,allow
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
allow from all
</Limit>
The most important.
For me it only works when I disabled mod security in:
CWP > Segurity > Flap Accounts > Disable.
After a lot of work I managed to install Nextcloud 19.
Procedures performed:
1) Rebuild Apache with the following added switches – you can use Apache 2.4.x
Add..
--enable-dav
--enable-dav-fs
--enable-dav-lock
--enable-auth-digest
--enable-authn-core
--enable-authz-core
2) Enable the Apache modules: nano /usr/local/apache/conf/httpd.conf
LoadModule alias_module modules/mod_alias.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dav_lock_module modules/mod_dav_lock.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
Include conf/extra/httpd-dav.conf
3) Restart Apache:
systemctl restart httpd
4) Check for dav modules:
/usr/local/apache/bin/httpd -M | grep -i dav
The result should look like this:
dav_module (shared)
dav_fs_module (shared)
dav_lock_module (shared)
5) Edit your “httpd-userdir.conf” nano /usr/local/apache/conf/extra/httpd-userdir.conf
…replace everything in this file with the following text…
<Directory "/home/*/public_html">
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
6) Change the vhosts for nextcloud
Find your vhost file(s) (/usr/local/apache/conf.d/vhosts) Modify both the ordinary vhost and the one marked “ssl” if using an SSL certificate (which I advise…)
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/ocm-provider /Cloud/ocm-provider/ [R=301,L]
RewriteRule ^/ocs-provider /Cloud/ocs-provider/ [R=301,L]
RewriteRule ^/\.well-known/carddav /Cloud/remote.php/dav/ [R=301,L]
RewriteRule ^/\.well-known/caldav /Cloud/remote.php/dav/ [R=301,L]
</IfModule>
7)
Edit your Nextcloud .htaccess file
…adding the following data to the end of the file:
<Limit GET POST>
order deny,allow
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
allow from all
</Limit>
The most important.
For me it only works when I disabled mod security in:
CWP > Segurity > Flap Accounts > Disable.
Pages: [1]