Jean G
Jean G

Reputation: 23

nextcloud issue : duplicate upstream "php-handler"

I'm actually facing an issue with my Nextcloud server on Nginx who doesn't want to start.

I installed Nextcloud as mentionned in the official documentation : https://docs.nextcloud.com/server/15/admin_manual/installation/nginx.html

But when I start the service :

  • nginx: [emerg] duplicate upstream "php-handler" in /etc/nginx/sites-enabled/nextcloud.conf:1 févr. 15
  • nginx: configuration file /etc/nginx/nginx.conf test failed
  • nginx.service: Control process exited, code=exited status=1

I tried to re-install properly php-fpm but it still does not work.

Could someone help me ? Thanks.

Upvotes: 1

Views: 5130

Answers (1)

ramin
ramin

Reputation: 71

if you configuration more than one website edited site1.conf and site2.conf on the path.
Step 1 :

vi /etc/nginx/sites-available/site1.conf
vi /etc/nginx/sites-available/site2.conf

and comment this block :

#upstream php-handler {
#   server 127.0.0.1:9000;
#}

Step 2 : Edit this path :

vi /etc/nginx/conf.d/php-fpm.conf

and set this value :

upstream php-fpm {
    server 127.0.0.1:9000;
}

and restart php-fpm & nginx service.

Upvotes: 3

Related Questions