Install Config Wiki

All about installing, configuring and troubleshooting

User Tools

Site Tools


configure_ubuntu_server_20_04_host_nextcloud_hub_21

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
configure_ubuntu_server_20_04_host_nextcloud_hub_21 [2021/04/28 04:58] – [Extract the Downloaded nextcloud.zip file to the root directory of the Website virtual directory] wikiadminconfigure_ubuntu_server_20_04_host_nextcloud_hub_21 [2021/04/29 03:56] (current) – [Configure an Apache Virtual Host File for the Fully Qualified Domain and Local IP] wikiadmin
Line 972: Line 972:
 <code> <code>
 sudo chown www-data:www-data /var/www/domain_org/public_html/domain_org/nextcloud/ -R sudo chown www-data:www-data /var/www/domain_org/public_html/domain_org/nextcloud/ -R
 +</code>
 +
 +===== Setup a MySQL Database for the Nextcloud Installation using PhpMyAdmin =====
 +
 +Login as rootuser in PhpMyAdmin from a Web Browser on the local network and Create a Database for the Nextcloud Installation:
 +
 +Select the Database Tab, and where it says New Database Name, provide the following information.
 +
 +Example:
 +
 +database name: yourusername_nextcloud  
 +Create it.
 +
 +Select that new empty Database from the left panel.
 +
 +Select the Privileges tab.
 +
 +Create the Username - yourusername - and select 'Grant All Privileges' for the username on the new Database.
 +
 +db username: yourusername
 +
 +on: localhost
 +
 +db Password: $Pwd#4646116 (Something that meets the applicable complexity requirements)
 +
 +
 +===== Configure Apache for Nextcloud =====
 +Enable a few Apache modifications for Nextcloud to properly run. I believe that this enables the URL Rewrite Module.
 +
 +<code>
 +sudo a2enmod headers env dir mime rewrite
 +
 +sudo service apache2 restart
 +</code>
 +===== Configure an Apache Virtual Host File for the Fully Qualified Domain and Local IP =====
 +
 +Change directories to the sites available virtual host subdirectory.
 +
 +<code>
 +cd /etc/apache2/sites-available/
 +
 +ls
 +
 +</code>
 +
 +<code>
 +sudo cp 000-default.conf yourdomain-org.conf
 +</code>
 +
 +<code>
 +sudo vim yourdomain-org.conf
 +</code>
 +
 +<code>
 +<VirtualHost *:80>
 +
 +    ServerName yourdomain.org  www.yourdomain.org
 +    DocumentRoot /var/www/yourdomain_org/public_html/yourdomain_org/nextcloud
 +
 +    <Directory /var/www/domain_org/public_html/domain_org/nextcloud/>
 +        Require all granted
 +        AllowOverride All
 +        Options FollowSymLinks MultiViews
 +
 +        <IfModule mod_dav.c>
 +            Dav off
 +        </IfModule>
 +
 +        RewriteEngine On
 +        RewriteRule ^/\.well-known/carddav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
 +        RewriteRule ^/\.well-known/caldav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
 +        RewriteRule ^/\.well-known/host-meta https://%{SERVER_NAME}/public.php?service=host-meta [QSA,L]
 +        RewriteRule ^/\.well-known/host-meta\.json https://%{SERVER_NAME}/public.php?service=host-meta-json [QSA,L]
 +        RewriteRule ^/\.well-known/webfinger https://%{SERVER_NAME}/public.php?service=webfinger [QSA,L]
 +
 +    </Directory>
 +
 +    ErrorLog ${APACHE_LOG_DIR}/error.log
 +    CustomLog ${APACHE_LOG_DIR}/access.log combined
 +
 +</VirtualHost>
 +</code>
 +
 +===== Enable the Virtual Host =====
 +
 +<code>
 +cd /etc/apache2/sites-available
 +
 +sudo a2ensite yourdomain-org.conf
 +
 +sudo systemctl reload apache2
 +
 </code> </code>
configure_ubuntu_server_20_04_host_nextcloud_hub_21.1619585936.txt.gz · Last modified: 2021/04/28 04:58 by wikiadmin