To use the directory-based installation, put the following in your nextcloud.conf replacing the Directory and Alias filepaths with the filepaths appropriate for your system:
To use the virtual host installation, put the following in your nextcloud.conf replacing ServerName, as well as the DocumentRoot and Directory filepaths with values appropriate for your system:
For Nextcloud to work correctly, we need the module mod_rewrite. Enable it by running:
Additional recommended modules are mod_headers, mod_env, mod_dir and mod_mime: