• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Issue Invalid nginx configuration: nginx: [emerg] "upstream"

MarcoMAGENTObr82

New Pleskian
Good evening,
I have a Magento site.

In domain> Apache & nginx Settings I disabled Proxy Mode and in Additional nginx directives I wrote the following:

fastcgi_read_timeout 600s;
fastcgi_connect_timeout 600s;

upstream fastcgi_backend {
server unix:/run/php/php7.3-fpm.sock;
}

server {
listen 443 ssl http2;

#server_name www.dom.it;
server_name dom.it www.dom.it ipv4.dom.it;

ssl_certificate /opt/psa/var/certificates/scftiG9fO;
ssl_certificate_key /opt/psa/var/certificates/keyprv;
ssl_client_certificate /opt/psa/var/certificates/scfAW63EW;

#ssl on;
ssl_certificate /opt/psa/var/modules/letsencrypt/etc/archive/dom.it/fullchain9.pem;
ssl_certificate_key /opt/psa/var/modules/letsencrypt/etc/archive/dom.it/privkey9.pem;

if ($host ~* ^dom\.com$) {
rewrite ^(.*)$ https://www.dom.it$1 permanent;
}

#extension letsencrypt begin
location ^~ /.well-known/acme-challenge/ {
root /var/www/vhosts/default/htdocs;

types { }
default_type text/plain;

satisfy any;
auth_basic off;
allow all;

location ~ ^/\.well-known/acme-challenge.*/\. {
deny all;
}
}
#extension letsencrypt end

set $MAGE_ROOT /var/www/vhosts/dom.it/httpdocs;
set $MAGE_MODE developer;

include /var/www/vhosts/dom.it/httpdocs/nginx.conf.sample;
}

server {
listen 80;

#server_name www.dom.it;
server_name dom.it www.dom.it ipv4.dom.it;

if ($host ~* ^dom\.it$) {
rewrite ^(.*)$ http://www.dom.it$1 permanent;
}

#extension letsencrypt begin
location ^~ /.well-known/acme-challenge/ {
root /var/www/vhosts/default/htdocs;

types { }
default_type text/plain;

satisfy any;
auth_basic off;
allow all;

location ~ ^/\.well-known/acme-challenge.*/\. {
deny all;
}
}
#extension letsencrypt end

set $MAGE_ROOT /var/www/vhosts/dom.it/httpdocs;
set $MAGE_MODE developer;

include /var/www/vhosts/dom.it/httpdocs/nginx.conf.sample;
}

include_path = ".:/var/www/vhosts/dom.it/httpdocs/vendor/magento/zendframework1/library"

Invalid nginx configuration: nginx: [emerg] "upstream" directive is not allowed here in /var/www/vhosts/system/dom.it/conf/vhost_nginx.conf:4 nginx: configuration file /etc/nginx/nginx.conf test failed.

Thanks for your help

Marco
 
Back
Top