- Websites are not accessible with an error like below:
CONFIG_TEXT: Connecting to example.com |192.0.2.2|:80... failed: Connection refused.
- In Plesk interface following message appears:
PLESK_ERROR: New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] unknown log format "main" in /etc/nginx/nginx.conf:28 nginx: configuration file /etc/nginx/nginx.conf test failed.
The line mentioned in the error message is not commented:
# grep -nr access_log /etc/nginx/nginx.conf
28: access_log /var/log/nginx/access.log main;
access_log format specified in
/etc/nginx/nginx.conf: access_log format is not supported and is commented by default. It was un-commented manually on a server.
- Connect to the server via SSH
- Create the copy of the nginx configuration file:
# cp -rp /etc/nginx/nginx.conf nginx.conf.backup
- Open in text editor configuration file /etc/nginx/nginx.conf and comment the line mentioned in the error as follows:
#access_log /var/log/nginx/access.log main;
- Apply settings:
# plesk repair web