Answer the question
In order to leave comments, you need to log in
When reloading nginx, error duplicate upstream "php-fpm" in /etc/nginx/common/upstream:2?
Hello.
A website (php) is running on a remote ubuntu server. With nginx settings along the path nginx/sites-available/default. You need to set up and run another site (php, laravel) on the same server. To do this, I created another server block in the nginx settings, similar to default, only changed the port.
/etc/nginx/sites-available/laravel
server
{
listen 81;
server_name domain.com ;
root /var/www/laravel/www/public;
access_log /var/www/laravel/logs/access.log;
error_log /var/www/laravel/logs/error.log;
client_max_body_size 100m;
index index.php index.html index.htm;
location ^~ /upload/ {}
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico)$ {
access_log off;
expires max;
}
location ~ \.php$ {
#fastcgi_split_path_info ^(.+\.php)(/.+)$;
#fastcgi_pass 127.0.0.1:9007;
#fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#include fastcgi_params;
include common/php-fpm;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ /\.ht {
deny all;
}
#
#sendfile off;
}
upstream php-fpm
{
server unix:/var/run/php5-fpm.sock;
}
upstream fcgiwrap
{
server unix:/var/run/fcgiwrap.socket;
}
Answer the question
In order to leave comments, you need to log in
This means that the same upstream is set somewhere else, or /etc/nginx/common/upstream is included several times.
You can search like this:grep -r upstream /etc/nginx
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question