diff options
Diffstat (limited to 'content/nextcloud.md')
| -rw-r--r-- | content/nextcloud.md | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/content/nextcloud.md b/content/nextcloud.md index 0109e5e..9ec7627 100644 --- a/content/nextcloud.md +++ b/content/nextcloud.md @@ -22,10 +22,10 @@ cloud experience (in the likes of Google Services, anyways). First, we install the dependencies: ```sh -apt install -y nginx python3-certbot-nginx mariadb-server php7.4 php7.4-{fpm,bcmath,bz2,intl,gd,mbstring,mysql,zip,xml,curl} +apt install -y nginx python3-certbot-nginx mariadb-server php php-{fpm,bcmath,bz2,intl,gd,mbstring,mysql,zip,xml,curl} ``` -*Optionally*, you can improve the performance of your Nextcloud server by adjusting the child processes that are used to execute PHP scripts. That way, more PHP scripts can be executed at once. Make the following adjustments to `/etc/php/7.4/fpm/pool.d/www.conf`: +*Optionally*, you can improve the performance of your Nextcloud server by adjusting the child processes that are used to execute PHP scripts. That way, more PHP scripts can be executed at once. Make the following adjustments to `/etc/php/8.2/fpm/pool.d/www.conf`: ```systemd pm = dynamic @@ -74,7 +74,7 @@ below and change some of the placeholders as you wish: ```mysql CREATE DATABASE nextcloud; -GRANT ALL ON nextcloud.* TO 'username'@'localhost' IDENTIFIED BY 'password'; +GRANT ALL ON nextcloud.* TO '<your_username>'@'localhost' IDENTIFIED BY '<your_password>'; FLUSH PRIVILEGES; EXIT; ``` @@ -94,11 +94,11 @@ In `/etc/nginx/sites-available/` we need to make a new configuration for Nextcloud (example: `/etc/nginx/sites-available/nextcloud`). -Add the following content [based of Nextcloud's recommendations](https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html) to the file, **remembering to replace `nextcloud.example.org` with your Nextcloud domain**. +Add the following content [based of Nextcloud's recommendations](https://docs.nextcloud.com/server/25/admin_manual/installation/nginx.html) to the file, **remembering to replace `nextcloud.example.org` with your Nextcloud domain**. ```nginx upstream php-handler { - server unix:/var/run/php/php7.4-fpm.sock; + server unix:/var/run/php/php-fpm.sock; server 127.0.0.1:9000; } map $arg_v $asset_immutable { @@ -128,13 +128,13 @@ server { gzip_proxied expired no-cache no-store private no_last_modified no_etag auth; gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; client_body_buffer_size 512k; - add_header Referrer-Policy "no-referrer" always; - add_header X-Content-Type-Options "nosniff" always; - add_header X-Download-Options "noopen" always; - add_header X-Frame-Options "SAMEORIGIN" always; - add_header X-Permitted-Cross-Domain-Policies "none" always; - add_header X-Robots-Tag "none" always; - add_header X-XSS-Protection "1; mode=block" always; + add_header Referrer-Policy "no-referrer" always; + add_header X-Content-Type-Options "nosniff" always; + add_header X-Download-Options "noopen" always; + add_header X-Frame-Options "SAMEORIGIN" always; + add_header X-Permitted-Cross-Domain-Policies "none" always; + add_header X-Robots-Tag "noindex, nofollow" always; + add_header X-XSS-Protection "1; mode=block" always; fastcgi_hide_header X-Powered-By; index index.php index.html /index.php$request_uri; location = / { @@ -204,11 +204,11 @@ ln -s /etc/nginx/sites-available/nextcloud /etc/nginx/sites-enabled/ ## Installing Nextcloud Itself We should have all the moving pieces in place now, so we can download and -install Nextcloud itself. First, download the latest Nextcloud version and we will extract into `/var/www/` and ensure Nginx has the authority to use it. +install Nextcloud itself. First, download the latest Nextcloud 25 version and we will extract into `/var/www/` and ensure Nginx has the authority to use it. ```sh -wget https://download.nextcloud.com/server/releases/latest.tar.bz2 -tar -xjf latest.tar.bz2 -C /var/www +wget https://download.nextcloud.com/server/releases/latest-25.tar.bz2 +tar -xjf latest-25.tar.bz2 -C /var/www chown -R www-data:www-data /var/www/nextcloud chmod -R 755 /var/www/nextcloud ``` @@ -216,7 +216,7 @@ chmod -R 755 /var/www/nextcloud Start and enable php-fpm and reload nginx: ```sh -systemctl enable php7.4-fpm --now +systemctl enable php8.2-fpm --now systemctl reload nginx ``` |
