• 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

Resolved nginx.conf file is empty for one domain only

magiks

New Pleskian
Server operating system version
CentOS Linux 7.9.2009
Plesk version and microupdate number
Plesk Obsidian v18.0.52_build1800230516.12
Hi all,

As the title indicates, the nginx configuration file for a domain is empty, this causes the impossibility of accessing the site concerned and the name of the certificate no longer matches. (/var/www/vhosts/system/domain.tld/conf/nginx.conf)
Any changes to the web hosting seem to fail to rewrite correctly this configuration file.

A regeneration of the file via the Webserver Configurations Troubleshooter tool recreated an empty file.
plesk repair web command also not working.

The other sites hosted on the server are functioning normally.

And to give a little more context.
The problem has been present for a few days, the ruleset of the ModSecurity firewall has been changed from Atomic to Comodo.
Perhaps there is a causal link.

Any help or advice will be helpful, many thanks in advance.
Quentin

Capture d’écran 2023-06-02 à 16.58.07.png

Capture d’écran 2023-06-02 à 17.10.57.png
 
Please run
# plesk repair db -y
to fix database inconsistencies. Probably there are some. Then run
# plesk repair web <your domain name>
to recreate the config files.
 
Please run
# plesk repair db -y
to fix database inconsistencies. Probably there are some. Then run
# plesk repair web <your domain name>
to recreate the config files.

Hello,

Thank you for the reply.
Unfortunately no error message came up with this command.
The config file still is the same.
What can we do next to troubleshoot this ?

Regards,
Quentin

Capture d’écran 2023-06-05 à 08.53.48.png
 
Do you have custom configuration templates in place?
We don’t have custom configuration templates in place.

However the problem is partially solved! (moved to another website)
It appears that the website defined by default under Tools and settings > IP Addresses is the one causing the problem with the configuration file.
By changing the current default website, the configuration file is "normal" again and the website is functional.

Hope this can help some people.

Thanks again for your help,
Quentin
 
We don’t have custom configuration templates in place.

However the problem is partially solved! (moved to another website)
It appears that the website defined by default under Tools and settings > IP Addresses is the one causing the problem with the configuration file.
By changing the current default website, the configuration file is "normal" again and the website is functional.

Hope this can help some people.

Thanks again for your help,
Quentin
Hello, we encountered the same problem with empty nginx config files this week at 2 wordpress multisites on our server. They where redirecting to 1 other multisite on the server. This multisite had a normal nginx.config file. Was your problem also wirh wordpress multisites?
 
Back
Top