Security Errors & Warnings

I recently installed NextCloud on DigitalOcean (Ubuntu server). It is giving me these errors:

"Your data directory and your files are probably accessible from the Internet. The .htaccess file is not working. We strongly suggest that you configure your web server in a way that the data directory is no longer accessible or you move the data directory outside the web server document root.

No memory cache has been configured. To enhance your performance please configure a memcache if available. Further information can be found in our documentation."

I have tried installing memcached and apcu to fix the second error with no luck. Have spent hours and hours trying to fix this…can somebody please help me? Thank you!