• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Nginx Config File rebuilds after server reboot

tareknassar

New Pleskian
Server operating system version
Ubuntu 20.04 x64
Plesk version and microupdate number
Obsidian 18.0.46
Hello,

I am receiving the following issue on a wordpress website hosted on Plesk SE

cURL error 7: Failed to connect to mydomain.com port 443: Connection refused (http_request_failed)

after investigating the issue and with the help of some technical support we were able to resolve the issue by modifying the Nginx Config file from Plesk Terminal. However, once the server reboots the config files are rebuilt to the original state and all changes are reverted. Nginx creates a .bak file with the changes and loads the original file.

Any thoughts on how to modify the config file without having the changes revert back upon reboot.

thank you.
 
What about adding your modifications through "Additional nginx directives" in "Apache & nginx Settings" of your domain?
 
What about adding your modifications through "Additional nginx directives" in "Apache & nginx Settings" of your domain?
Can you explain more, I am not a very technical person and I will give your reply to someone who is so they can work on it.

thank you.
 
Any thoughts on how to modify the config file without having the changes revert back upon reboot.
Depending on the type of change in configuraton you can either

- add an "add-in" configuration file into the /etc/nginx/conf.d directory (this will not work for instructions that need to go into a "server { ... }" bracket)

or

- as @IgorG said login into Plesk GUI with your admin user, go the subscription, click on "Hosting & DNS" > "Apache & nginx settings", scroll down to the "Additional nginx directives" and copy your code into that field then store the new configuration with "OK" or "Apply".

The first will be included in the Nginx configuration even if the general Nginx configuration file is replaced upon reboot, because Nginx scans the conf.d directory for inclusions. That's what this directory is for. The later will create an individual virtualhost configuration for the domain which will not be replaced by a default upon reboot either. The later is the preferred solution.
 
Back
Top