Rebuild Apache with options:
-–enable-dav
-–enable-dav-fs
-–enable-dav-lock
-–enable-auth-digest
-–enable-authn-core
-–enable-authz-core
Uncomment:
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 authz_user_module modules/mod_authz_core.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
Uncomment also:
Include conf/extra/httpd-dav.conf
then restart httpd:
systemctl restart httpd
check apache:
/usr/local/apache/bin/httpd -M | grep -i dav
If results this it'all right:
dav_module (shared)
dav_fs_module (shared)
dav_lock_module (shared)
Edit
/usr/local/apache/conf/extra/httpd-userdir.conf
Replace with this code:
<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>
restart httpd:
systemctl restart httpd
add on the bottom of .htaccess file of nextcloud directory
<Limit GET POST>
order deny,allow
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
allow from all
</Limit>
That's all