• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Plesk migration manager - adjust vhost_nginx.conf custom config using IP mapping

I guess my experience with modifying these files is different than yours. Whenever the nginx settings are modified after editing that file directly, the file is reverted back to original and the new settings from the GUI applied to it. Is this not so?
No, it isn't...

My original script is doing something else. I have of course no experience with the posted script. It was written this morning and I did a few tests which passed...

The original script only creates a vhost_nginx.conf if none exists. To get Nginx to use that file I tried a few things and ended up with doing a plesk repair web.

This apparently creates an include in the domain's Nginx.conf and also makes it editable in Plesk's interface.

A Plesk repair web normally rebuilds everything based on the info it is in its database so surviving this makes me draw the conclusion it's stable.

I'm using that even as a cronjob.
It creates a HSTS include for sites that have a certain ssl plugin for WordPress (only if no vhost_nginx.conf exists and redirect to ssl is turned on).

Tomorrow I can post that script, but it may well be published already on this forum.

Try that "plesk repair web" before editing!
You never claimed you tested that.
 
Last edited:
Back
Top