Comments on How to Install Nextcloud with Nginx and PHP7-FPM on CentOS 7

In this tutorial, I will show you how to install and configure the latest Nextcloud 10 release on a CentOS 7 server. I will run Nextcloud with a Nginx web server and PHP7-FPM and use MariaDB as the database system.

20 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: hightur

Hello, Very nice tutorial :) I would prefer use https with lets encrypt. ++

By: whirlyNerd

Too easy! For a CentOS 7 machine running nginx and using certbot to manage your letsencrypt certificates, they are installed at /etc/letsencrypt/live/[your domain]/. Just change the path in your .conf file to fullchain.pem for the ssl_certificate and privkey.pem for the ssl_certificate_key like so:

ssl_certificate /etc/letsencrypt/live/[your domain]/fullchain.pem

ssl_certificate_key /etc/letsencrypt/live/[your domain]/privkey.pem

By: Johan Sanchez

Hi Friend .... tuturial its OK .... woking now... but

Please help problem with https ... browser block it

By: Johan Sanchez

Hi Friend .... tuturial its OK .... woking now... but

Please help problem with https ... browser block it

By: olco

Excellent Tutorial! Thanks.

Small question, would this work with the CentOS 7 Minimal ISO or some services would be missing??

 

By: Mike

Hi, Thank for this tutorial

i have a problem. when i open website it's download php file instead of execute of it.

By: Gonzo

I followed step by step this guide but I get one 404. I can see this error in /var/log/nginx/error.log

2017/11/14 17:12:10 [error] 2151#0: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: X.X.X.X, server: cloud.XXXX.org, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "cloud.xxxx.com"

Seems to be related with this block:

    location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {        include fastcgi_params;        fastcgi_split_path_info ^(.+\.php)(/.*)$;        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;        fastcgi_param PATH_INFO $fastcgi_path_info;        fastcgi_param HTTPS on;        #Avoid sending the security headers twice        fastcgi_param modHeadersAvailable true;        fastcgi_param front_controller_active true;        fastcgi_pass php-handler;        fastcgi_intercept_errors on;        fastcgi_request_buffering off;    }

Does this happen to you?. Where is the error?

Thank you!

By: Fred

# REPLACEfastcgi_pass php-handler;# with{FASTCGIPASS

By: Greg

I'm having sam problem with php-fpm as Gonzo. Looks like a problem with forwarding php script name.

By: anki

To bad SELinux configuration isn't working on CentOS 7

By: Jayden

yum -y install policycoreutils-python

 should be

yum -y install policycoreutils-python-utils

 

By: vixwd

@Jayden

yum -y install policycoreutils-python-utils

Shows an error, that no such package is available?

By: TheAli3n

Other way round:

yum -y install policycoreutils-python-utils

should be

yum -y install policycoreutils-python

By: Baya

Hello !

Really great tutorial ! It helped me a lot

Regards

By: rizki

please help me, after doing all step, i have a problem at open in browser, 

404 Not Found

nginx/1.12.2

, how to solve this problem? 

By: Luiz

try_files $uri $uri/ /index.php?q=$uri&$args;

By: Eduardo

I have a doubt about answering questions in openssl, the answers can be invented ? Im worried about common name or hostname..... In ther tutorials says FQDN but i thing is not important, the important thing is that you generate two files, the key and crt...

 

Im right or can i have problems if i put the name localhost or 192.1.68.50 or http:;//localhost... Im using a local virtualmachine

 

Thanks

By: adri

Youn need to install the package "php-pecl-zip" for the latest version of nextcloud. Otherwise, you'll get an error at the very beginning.

I have installed 17.0.1 version

In addition, I had to change some configurations, because I already had installe wordpress, and I didn't want https to work.

Also, for those who don't want https because they are just testing, it's very IMPORTANT TO COMMENT the line "fastcgi_param HTTPS on;" on the virtualhost configuration. If you have that line, you'll get connection timed out errors, because you are sending to php-fpm https parameters who doesn't exist so it goes in infinite loop for this reason.

 

By: Wolfchen

Hi Muhammad Arul,I would like to redirect DB to another server when I running installation wizard.It's display me this error "Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'xx.xx.xx.xx' (13)"How to fix it?

By: Kim

Amazing guide and very easy to follow! Thanks a lot, will recommend this to others if needed!