Please check if you have "Additional Nginx Directives" set in <mydomain.com>. Maybe it was attempted to add a "server" block to it? If so, please remove or comment the block, then reconfigure the web server (e.g. Webserver Configuration Trouble Shooter > "Rebuild" > "Broken").
Hello, this is the nginx configuration file that the error refers to, all configuration files for other vhosts have the same structure.
server {
listen "my IP":443 ssl;
ssl_certificate /opt/psa/var/certificates/"my certificate";
ssl_certificate_key /opt/psa/var/certificates/"my certificate";
server_name www.mydomain.com;
location / {
return 301 https://mydomain.com$request_uri;
}
}
server {
listen "my IP":443 ssl http2;
server_name mydomain.com;
server_name ipv4.mydomain.com;
ssl_certificate /opt/psa/var/certificates/"my certificate"; ssl_certificate_key /opt/psa/var/certificates/"my certificate";
client_max_body_size 134217728;
access_log "/var/www/vhosts/system/mydomain.com/logs/proxy_access_ssl_log";
error_log "/var/www/vhosts/system/mydomain.com/logs/proxy_error_log";
root "/var/www/vhosts/mydomain.com/httpdocs";
#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
#extension sslit begin
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains" always;
#OCSP Stapling
ssl_stapling on;
ssl_stapling_verify on;
#extension sslit end
#extension sectigo begin
location ^~ /.well-known/pki-validation/fileauth.txt {
try_files $uri $uri/ =404;
}
location ^~ /.well-known/pki-validation/ {
root /var/www/vhosts/default/htdocs;
types { }
default_type text/plain;
satisfy any;
auth_basic off;
allow all;
location ~ ^/\.well-known/pki-validation.*/\. {
deny all;
}
}
#extension sectigo end
#extension kolab begin
location ~* ^/autodiscover/autodiscover.xml {
proxy_pass https://127.0.0.1:7081;
proxy_set_header Host webmail.$host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~* ^/(\.well-known/autoconfig/|)mail/config-v1.1.xml {
proxy_pass https://127.0.0.1:7081;
proxy_set_header Host webmail.$host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
#extension kolab end
error_page 400 "/error_docs/bad_request.html";
error_page 401 "/error_docs/unauthorized.html";
error_page 403 "/error_docs/forbidden.html";
error_page 404 "/error_docs/not_found.html";
error_page 500 "/error_docs/internal_server_error.html";
error_page 405 "/error_docs/method_not_allowed.html";
error_page 406 "/error_docs/not_acceptable.html";
error_page 407 "/error_docs/proxy_authentication_required.html";
error_page 412 "/error_docs/precondition_failed.html";
error_page 414 "/error_docs/request_uri_too_long.html";
error_page 415 "/error_docs/unsupported_media_type.html";
error_page 501 "/error_docs/not_implemented.html";
error_page 502 "/error_docs/bad_gateway.html";
error_page 503 "/error_docs/maintenance.html";
location ^~ /error_docs {
root "/var/www/vhosts/mydomain.com";
}
location / {
proxy_pass https://"my IP":7081;
proxy_hide_header upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Accel-Internal /internal-nginx-static-location;
access_log off;
}
location ^~ /internal-nginx-static-location/ {
alias /var/www/vhosts/mydomain.com/httpdocs/;
internal;
}
location ~ ^/(plesk-stat|awstats-icon|webstat|webstat-ssl|ftpstat|anon_ftpstat) {
proxy_pass https://"my IP":7081;
proxy_hide_header upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Accel-Internal /internal-nginx-static-location;
access_log off;
}
location ~ ^/~(.+?)(/.*?\.php)(/.*)?$ {
alias /var/www/vhosts/mydomain.com/web_users/$1/$2;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
try_files $uri $fastcgi_script_name =404;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass "unix:/var/www/vhosts/system/mydomain.com/php-fpm.sock";
include /etc/nginx/fastcgi.conf;
}
location ~ ^/~(.+?)(/.*)?$ {
proxy_pass https://"my IP":7081;
proxy_hide_header upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Accel-Internal /internal-nginx-static-location;
access_log off;
}
location ~ \.php(/.*)?$ {
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
try_files $uri $fastcgi_script_name =404;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass "unix:/var/www/vhosts/system/mydomain.com/php-fpm.sock";
include /etc/nginx/fastcgi.conf;
}
disable_symlinks if_not_owner "from=/var/www/vhosts/mydomain.com";
add_header X-Powered-By PleskLin;
}
server {
listen "my IP":80;
server_name www.mydomain.com;
location / {
return 301 https://mydomain.com$request_uri;
}
}
server {
listen "my IP":80;
server_name mydomain.com;
server_name ipv4.mydomain.com;
client_max_body_size 134217728;
access_log "/var/www/vhosts/system/mydomain.com/logs/proxy_access_log";
error_log "/var/www/vhosts/system/mydomain.com/logs/proxy_error_log";
location / {
return 301 https://$host$request_uri;
}
}