• 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.

Resolved Where I've to put the Nginx's configuration?

WhiteTiger

Basic Pleskian
I have a VPS with Plesk as Reverse Proxy of Apache.

In a domain I have a WP Multisite -con sub domain configuration.

A plugin creates a file nginx.conf in the root of the domain associated with WP.
I wonder if I should move the contents of this configuration file to another location.

Thanks in advance.
 
In your "Websites & Domains" tab click on the "Apache & nginx settings". Disable "proxy mode", then enter specific Nginx directives into the input box below. Store the settings. Then click the "PHP" icon and change the setting to PHP-FPM served by Nginx (else these settings won't take effect). Take care when copying the file content from your Nginx.conf file, because it may not be ready to be used as additional directives in the Plesk Nginx setup. Normally you need to understand to the directives do and adapt them.
 
When Nginx runs as a reverse proxy, there is no need to have additional Nginx directives but maybe caching instructions. The configuration that you must choose depends on the directives in the Nginx.conf file that you mentioned. If you you don't know what this file does and your website runs without it, you can simply omit it. Else it is a good idea to first learn what the content of that file is meant for and then use it or not as you think it fits to your server environment.
 
I apologize for the imprecision.

When in Wordpress I configure a security plugin, this create a file with the directives, for example the "deny IP address" of the banned users.

Using htaccess the plugin will write directly in the file. Using Nginx I should specify instead the pathname of nginx.conf, but this in a folder above the root of the domain
So the plugin creates a nginx.conf in the root.

What I would like to know is whether the directives in this file are added to those contained in the main nginx.info or if the file in the root replaces the main file.
In this case I think I should take the directives, put them in "Apache & nginx settings" of Plesk and then remove the file in the root.
Hoping that, by doing this, the plugin does not create again the file.

Anyway I want to keep the reverse proxy.
 
The directives in that file can be added. But if the security plugin dynamically changes the file, it will probably be best to not to add the directives, but to create an "include" directive and include that file.
 
Thank you, Peter.
Where and how can I do this?
I'm working with Plesk shortly and I still move with difficulty.
 
I am afraid that if you want to use special Nginx directives, you need to read about Nginx in the manuals of Nginx. This is not a Plesk question. I've already explained where to enter additional Nginx commands, but you must know yourself, what commands you want to enter, where to place your files, how to include the files etc.
 
Back
Top