banner
「The Nanami」

「The Nanami」

游戏宅的自我介绍
github
bilibili
steam

Tinkering with Nextcloud again

Nextcloud has released the latest version 25.0.1, more powerful, more difficult to install. Here are some solutions to Nextcloud errors.

Some files failed integrity check.#

Usually, this is because the .user.ini file was locked during installation and was not replaced with Nextcloud's file.

Execute the command

 chattr -i /home/wwwroot/example.com/.user.ini

Replace the directory with your virtual host directory.

Then download the installation package from Github, extract .user.ini, and replace the file on the server.

If you still receive this error, execute the command again.

Insecure access to the site via HTTP.#

Ask your service provider to resolve this.

Other PHP modules are easy to install. Let's talk about the sodium module. If you install it directly, it will fail and you need to install the pre-package libsodium.

wget -N --no-check-certificate https://download.libsodium.org/libsodium/releases/libsodium-1.0.17.tar.gz
tar xvf libsodium-1.0.17.tar.gz
cd ./libsodium-1.0.17
./configure
make && make check
make install

After installation, install sodium and restart the service.

PHP modules "gmp" and/or "bcmath" are not enabled.#

As a personal cloud storage, you don't need these modules. You can ignore them. If you need these modules, install them yourself.

Your installation has not set the default phone region.#

In your website's root directory, find /config/config.php

Insert the following line second to last

'default_phone_region' => 'CN',

Your web server is not correctly set up to resolve#

There are a total of 4

Your web server is not correctly set up to resolve "/.well-known/webfinger".

Your web server is not correctly set up to resolve "/.well-known/nodeinfo".

Your web server is not correctly set up to resolve "/.well-known/caldav".

Your web server is not correctly set up to resolve "/.well-known/carddav".

Modify the nginx configuration file

cd /usr/local/nginx/conf/vhost
nano example.conf

Add the following content

location ^~ /.well-known {
        # The rules in this block are an adaptation of the rules
        # in `.htaccess` that concern `/.well-known`.

        location = /.well-known/carddav { return 301 /remote.php/dav/; }
        location = /.well-known/caldav  { return 301 /remote.php/dav/; }

        location /.well-known/acme-challenge    { try_files $uri $uri/ =404; }
        location /.well-known/pki-validation    { try_files $uri $uri/ =404; }

        # Let Nextcloud's API for `/.well-known` URIs handle all other
        # requests by passing them to the front-end controller.
        return 301 /index.php$request_uri;
    }

Note that the server block for port 80 and port 443 should both be added. If there are duplicate rules in the configuration file, please delete them.

Memory caching is not configured. To improve performance, please configure memory caching.#

Install Memcached and configure it. This article will not go into detail.

Edit the PHP configuration file

cd /usr/local/php/etc
nano ./php.ini

Find memory_limit and set its value to 512M

PHP installation seems incorrect, unable to access system environment variables. The getenv("PATH") function test returned an empty value.#

Edit php-fpm.conf

cd /usr/local/php/etc
nano ./php-fpm.conf

Add this line to php-fpm.conf

env[PATH] = /usr/local/bin:/usr/bin:/bin:/usr/local/php/bin

Insert the following line into the nginx configuration file

add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";

Note that the server block for port 80 and port 443 should both have this line inserted.

Summary#

Overall, Nextcloud is not very user-friendly for beginners, which is why there are more users in China using Cloudreve.

And when writing this guide, the official website documentation was actually in a 404 state???

Updated on January 20, 2023#

Docker is great.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.