configure_ubuntu_server_20_04_host_nextcloud_hub_21
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
configure_ubuntu_server_20_04_host_nextcloud_hub_21 [2021/04/28 03:47] – [Install PHP] wikiadmin | configure_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 326: | Line 326: | ||
</ | </ | ||
- | ===== Install | + | ===== Configure |
- | Installing PHP as an Apache module is a straightforward task. The case may be that php8.0 libapache2-mod-php8.0 is already installed, but you may try and be the newest version is already installed. | + | It may be that php8.0 libapache2-mod-php8.0 is already installed |
< | < | ||
Line 351: | Line 351: | ||
</ | </ | ||
- | By default, PHP-FPM is not enabled in Apache. | + | By default, PHP-FPM is not enabled in Apache. |
< | < | ||
Line 358: | Line 358: | ||
</ | </ | ||
- | This may already be enabled, and you will see the follow echo in terminal: | + | Again, this may already be enabled, and you will see the follow echo in terminal: |
< | < | ||
Line 899: | Line 899: | ||
</ | </ | ||
+ | ====== Installing NextCloud 21.0.1 on Linux Ubuntu 20.04 LTS with Apache2 Webserver ====== | ||
+ | Open PhpMyAdmin and Create a Database: | ||
+ | Example: | ||
+ | |||
+ | database name: yourusername_nextcloud | ||
+ | |||
+ | Select the Database from the left panel | ||
+ | |||
+ | Create Username - yourusername - and Grant All Privileges for the username on the database. | ||
+ | |||
+ | db username: | ||
+ | |||
+ | on: localhost | ||
+ | |||
+ | db Password: | ||
+ | |||
+ | ===== Download the NextCloud 21.0.1 Zip File to the Server ===== | ||
+ | |||
+ | SSH to login to the server and obtain a command line prompt. | ||
+ | |||
+ | < | ||
+ | |||
+ | Change directory to the downloads directory: | ||
+ | |||
+ | < | ||
+ | |||
+ | Download the nextcloud-21.0.1.zip file using the option to change the target filename to nextcloud.zip in the /downloads/ directory. | ||
+ | |||
+ | < | ||
+ | sudo wget -O nextcloud.zip https:// | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Extract the Downloaded nextcloud.zip file to the root directory of the Website virtual directory ===== | ||
+ | |||
+ | Example Extract Folder to the path of the root directory of the website: | ||
+ | |||
+ | / | ||
+ | |||
+ | **First, Install the Unzip utility** | ||
+ | |||
+ | < | ||
+ | |||
+ | Unzip the freshly downloaded nextcloud.zip file into the directory one step in the path before the root ' | ||
+ | |||
+ | You can make the directory path first, or just properly extract the nextcloud.zip file to create the path. For example, run the following and substitute your fully qualified secondary domain name instead of domain_org in the following new web path. | ||
+ | |||
+ | < | ||
+ | cd /var/www/ | ||
+ | |||
+ | sudo mkdir / | ||
+ | |||
+ | cd / | ||
+ | |||
+ | sudo mkdir / | ||
+ | |||
+ | cd / | ||
+ | |||
+ | sudo mkdir / | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | cd /downloads/ | ||
+ | |||
+ | sudo unzip nextcloud.zip -d / | ||
+ | </ | ||
+ | |||
+ | Make the Apache web-user the owner of the nextcloud directory so that the Apache server has access to the website root and all subdirectories. | ||
+ | |||
+ | < | ||
+ | sudo chown www-data: | ||
+ | </ | ||
+ | |||
+ | ===== 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' | ||
+ | |||
+ | db username: yourusername | ||
+ | |||
+ | on: localhost | ||
+ | |||
+ | db Password: $Pwd# | ||
+ | |||
+ | |||
+ | ===== Configure Apache for Nextcloud ===== | ||
+ | Enable a few Apache modifications for Nextcloud to properly run. I believe that this enables the URL Rewrite Module. | ||
+ | |||
+ | < | ||
+ | sudo a2enmod headers env dir mime rewrite | ||
+ | |||
+ | sudo service apache2 restart | ||
+ | </ | ||
+ | ===== Configure an Apache Virtual Host File for the Fully Qualified Domain and Local IP ===== | ||
+ | |||
+ | Change directories to the sites available virtual host subdirectory. | ||
+ | |||
+ | < | ||
+ | cd / | ||
+ | |||
+ | ls | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | sudo cp 000-default.conf yourdomain-org.conf | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | sudo vim yourdomain-org.conf | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | |||
+ | ServerName yourdomain.org | ||
+ | DocumentRoot / | ||
+ | |||
+ | < | ||
+ | Require all granted | ||
+ | AllowOverride All | ||
+ | Options FollowSymLinks MultiViews | ||
+ | |||
+ | < | ||
+ | Dav off | ||
+ | </ | ||
+ | |||
+ | RewriteEngine On | ||
+ | RewriteRule ^/ | ||
+ | RewriteRule ^/ | ||
+ | RewriteRule ^/ | ||
+ | RewriteRule ^/ | ||
+ | RewriteRule ^/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ErrorLog ${APACHE_LOG_DIR}/ | ||
+ | CustomLog ${APACHE_LOG_DIR}/ | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== Enable the Virtual Host ===== | ||
+ | |||
+ | < | ||
+ | cd / | ||
+ | |||
+ | sudo a2ensite yourdomain-org.conf | ||
+ | |||
+ | sudo systemctl reload apache2 | ||
+ | |||
+ | </ |
configure_ubuntu_server_20_04_host_nextcloud_hub_21.1619581620.txt.gz · Last modified: 2021/04/28 03:47 by wikiadmin