Install Config Wiki

All about installing, configuring and troubleshooting

User Tools

Site Tools


Building an Ubuntu LEMP Server Hosting NextCloud and OnlyOffice Document Server

Install Nginx Webserver

Install PHP and PHP-FPM packages needed by Nextcloud

Install and Configure PHP7.4-FPM

sudo apt install php-fpm php-curl php-cli php-mysql php-gd php-common php-xml php-json php-intl php-pear php-imagick php-dev php-common php-mbstring php-zip php-soap php-bz2 -y

After the installation is complete, we will configure the php.ini files for php-fpm and php-cli. Go to the '/etc/php/7.4' directory.

cd /etc/php/7.4/

Edit the php.ini files for php-fpm and php-cli using vim

vim fpm/php.ini

vim cli/php.ini

Uncomment the 'cgi.fix_pathinfo' line and change the value to '0'.


Save and exit.

Next, edit the php-fpm pool configuration 'www.conf'.

vim fpm/pool.d/www.conf

Uncomment those lines below.

env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp

Save and exit.

Restart the PHP7.4-FPM service and enable it to launch every time on system boot.

systemctl restart php7.4-fpm
systemctl enable php7.4-fpm

Now check the PHP-FPM service using the following command.

ss -xa | grep php

systemctl status php7.4-fpm

And you will get the php-fpm is up and running under the sock file '/run/php/php7.4-fpm.sock'.

Unknown SSL Protocol Error Connecting from NextCloud to Document Server on localhost

building_ubuntu_lemp_server_hosting_nextcloud_onlyoffice_document.txt · Last modified: 2020/06/19 05:33 by wikiadmin