• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue webserver configuration troublshooter weird error

stas styler

Basic Pleskian
Hello,

I'm running Centos7.4 + Plesk Onyx 17.5.3 Update #30 + NGINX as reverse proxy over a VPS hosted in hetzner.
My server is 32GB ram, 8vcores.

I configured basic global gzip.conf + added some tweaks to nginx.conf and started adding domains.
I've had some problems that occurred some time after I've added a reseller domain.
The file "ulimit.global_params" gave me red notice in plesk that there was a duplicate worker_rlimit so I just tagged it in "ulimit.global_params" as suggested in kb.plesk.

couple of days later it occurred once again after I've added another reseller (as you can see I have 2 tagged lines in the screenshot of "ulimit.global_params".

All my subscriptions became with a red earth icon so I just reconfigured everything and tagged once again the line of "worker_rlimit_nofile 4096;"

All my domains were pointed to default plesk page even though all files were in place. So I went though all domains and, accessed to "apage & nginx setting" and pressed apply so it would reconfigure each one.

now I have this error:
Code:
Error: New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] duplicate listen options for [2a01:4f8:c0c:40c1::2]:80 in /etc/nginx/plesk.conf.d/server.conf:29 nginx: configuration file /etc/nginx/nginx.conf test failed. Search in KB

and a weird red "/" with no path and n/a.

all domains work fine, it just worries me and I just can't understand what seems to be the problem now.
I don't know what caused the duplication either.

Can someone please help me?
 

Attachments

  • nginx.conf.png
    nginx.conf.png
    38.3 KB · Views: 8
  • ulimit.global_params.png
    ulimit.global_params.png
    3 KB · Views: 5
  • nginx.png
    nginx.png
    43.5 KB · Views: 5
What is content of line 29 in /etc/nginx/plesk.conf.d/server.conf ?
 
here:

To be fare, I don't use IPV6 for my domains.
 

Attachments

  • serverconf.png
    serverconf.png
    28.1 KB · Views: 6
Last edited:
Please do not send screenshots of your configs, it is impossible to copy-paste from pictures in answers. Please use plain text instead of pictures! Thanks.

The problem in duplicated listen options for [2a01:4f8:c0c:40c1::2]:80. You need to remove it from /etc/nginx/plesk.conf.d/server.conf or another conflicted config.

Try to find all entries with something like

# grep -R '[2a01:4f8:c0c:40c1::2]:80' /etc/nginx/*

BTW, command

# plesk repair web

also may be useful.
 
Please do not send screenshots of your configs, it is impossible to copy-paste from pictures in answers. Please use plain text instead of pictures! Thanks.

The problem in duplicated listen options for [2a01:4f8:c0c:40c1::2]:80. You need to remove it from /etc/nginx/plesk.conf.d/server.conf or another conflicted config.

Try to find all entries with something like

# grep -R '[2a01:4f8:c0c:40c1::2]:80' /etc/nginx/*

BTW, command

# plesk repair web

also may be useful.
But this file overrides as it says on top of it doesn't it?
 
Do you have this line specified in Additional nginx directives in Plesk UI?
 
Do you have this line specified in Additional nginx directives in Plesk UI?
nope, don't have that line in additional.
Code:
# Expire rules for static content
# cache.appcache, your document html and data
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
    expires -1;
    # access_log logs/static.log; # I don't usually include a static log
}

# Feed
location ~* \.(?:rss|atom)$ {
    expires 1h;
    add_header Cache-Control "public";
}

# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
    expires 1M;
    access_log off;
    add_header Cache-Control "public";
}

# CSS and Javascript
location ~* \.(?:css|js)$ {
    expires 1y;
    access_log off;
    add_header Cache-Control "public";
}

# woff fonts should not be zipped.
location ~* \.(?:woff)$ {
    expires max;
    add_header Cache-Control public;
}
 
Last edited:
Back
Top