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
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