Hello
I have encountered a problem when changing the IP server
"New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] a duplicate default server for 192.168.122.100:443 in /etc/nginx/plesk.conf.d/ip_default/inetpv.cz.conf:7 nginx: configuration file /etc/nginx/nginx.conf test failed. Search in KB"
see picture
IP 192.168.122.100:443 not in conf
inetpv.cz.conf
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
server {
listen 192.168.111.100:443 default_server ssl http2;
server_name inetpv.cz;
server_name www.inetpv.cz;
server_name ipv4.inetpv.cz;
server_name inetpv.eu;
server_name www.inetpv.eu;
ssl_certificate /opt/psa/var/certificates/cert-bZPPoP;
ssl_certificate_key /opt/psa/var/certificates/cert-bZPPoP;
ssl_client_certificate /opt/psa/var/certificates/cert-mzfb7L;
client_max_body_size 128m;
root "/var/www/vhosts/inetpv.cz/httpdocs";
access_log "/var/www/vhosts/system/inetpv.cz/logs/proxy_access_ssl_log";
error_log "/var/www/vhosts/system/inetpv.cz/logs/proxy_error_log";
location ^~ /plesk-site-preview/ {
proxy_pass http://127.0.0.1:8880;
proxy_set_header Host plesk-site-preview.local;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cookie_domain plesk-site-preview.local $host;
access_log off;
}
if ($host ~* ^inetpv\.cz$) {
rewrite ^(.*)$ https://www.inetpv.cz$1 permanent;
}
if ($host ~* ^inetpv\.eu$) {
rewrite ^(.*)$ https://www.inetpv.cz$1 permanent;
}
if ($host ~* ^www\.inetpv\.eu$) {
rewrite ^(.*)$ https://www.inetpv.cz$1 permanent;
}
location / {
proxy_pass https://192.168.111.100:7081;
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/inetpv.cz/httpdocs/;
internal;
}
location ~ ^/(plesk-stat|awstats-icon|webstat|webstat-ssl|ftpstat|anon_ftpstat) {
proxy_pass https://192.168.111.100:7081;
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 ~ ^/files/ {
proxy_pass https://192.168.111.100:7081;
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;
}
add_header X-Powered-By PleskLin;
}
server {
listen 192.168.111.100:80 default_server;
server_name inetpv.cz;
server_name www.inetpv.cz;
server_name ipv4.inetpv.cz;
server_name inetpv.eu;
server_name www.inetpv.eu;
client_max_body_size 128m;
if ($host ~* ^inetpv\.cz$) {
return 301 https://www.$host$request_uri;
}
return 301 https://$host$request_uri;
Thank you for your help
I have encountered a problem when changing the IP server
"New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] a duplicate default server for 192.168.122.100:443 in /etc/nginx/plesk.conf.d/ip_default/inetpv.cz.conf:7 nginx: configuration file /etc/nginx/nginx.conf test failed. Search in KB"
see picture
IP 192.168.122.100:443 not in conf
inetpv.cz.conf
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
server {
listen 192.168.111.100:443 default_server ssl http2;
server_name inetpv.cz;
server_name www.inetpv.cz;
server_name ipv4.inetpv.cz;
server_name inetpv.eu;
server_name www.inetpv.eu;
ssl_certificate /opt/psa/var/certificates/cert-bZPPoP;
ssl_certificate_key /opt/psa/var/certificates/cert-bZPPoP;
ssl_client_certificate /opt/psa/var/certificates/cert-mzfb7L;
client_max_body_size 128m;
root "/var/www/vhosts/inetpv.cz/httpdocs";
access_log "/var/www/vhosts/system/inetpv.cz/logs/proxy_access_ssl_log";
error_log "/var/www/vhosts/system/inetpv.cz/logs/proxy_error_log";
location ^~ /plesk-site-preview/ {
proxy_pass http://127.0.0.1:8880;
proxy_set_header Host plesk-site-preview.local;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cookie_domain plesk-site-preview.local $host;
access_log off;
}
if ($host ~* ^inetpv\.cz$) {
rewrite ^(.*)$ https://www.inetpv.cz$1 permanent;
}
if ($host ~* ^inetpv\.eu$) {
rewrite ^(.*)$ https://www.inetpv.cz$1 permanent;
}
if ($host ~* ^www\.inetpv\.eu$) {
rewrite ^(.*)$ https://www.inetpv.cz$1 permanent;
}
location / {
proxy_pass https://192.168.111.100:7081;
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/inetpv.cz/httpdocs/;
internal;
}
location ~ ^/(plesk-stat|awstats-icon|webstat|webstat-ssl|ftpstat|anon_ftpstat) {
proxy_pass https://192.168.111.100:7081;
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 ~ ^/files/ {
proxy_pass https://192.168.111.100:7081;
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;
}
add_header X-Powered-By PleskLin;
}
server {
listen 192.168.111.100:80 default_server;
server_name inetpv.cz;
server_name www.inetpv.cz;
server_name ipv4.inetpv.cz;
server_name inetpv.eu;
server_name www.inetpv.eu;
client_max_body_size 128m;
if ($host ~* ^inetpv\.cz$) {
return 301 https://www.$host$request_uri;
}
return 301 https://$host$request_uri;
Thank you for your help
Attachments
Last edited: