banner
「The Nanami」

「The Nanami」

游戏宅的自我介绍
github
bilibili
steam

再度折騰 Nextcloud

Nextcloud has released the latest version 25.0.1, which is more powerful and harder to install. Here are some solutions to Nextcloud errors.

Some files failed the integrity check.#

This is usually caused by the .user.ini file being locked during installation and not replaced with Nextcloud's file.

Run 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 the .user.ini file, and replace the file on the server.

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

Accessing the site via HTTP is insecure.#

Contact your service provider to resolve this.

Other PHP modules are easy to install. Let's talk about the sodium module here. 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.#

These modules are not needed for personal cloud storage. You can ignore them. If you need these modules, install them yourself.

Your installation does not have a default phone region set.#

Find /config/config.php in your website's root directory.

Insert the following line second to last.

'default_phone_region' => 'CN',

Your web server is not properly set up to resolve#

There are a total of 4.

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

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

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

Your web server is not properly 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 does 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 and 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 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.

載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。