• 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 Source for server section of NGINX.conf

Jack Lee

New Pleskian
I'm only asking here, because you guys seem to know everything....not sure if this is a Plesk issue or not.

We run PHP 5.6.30 in production served with nginx through the Plesk Onyx panel. Our test site is PHP 7.0.19. Our website is Wordpress.

I find myself needing to modify the nginx.conf file, basically adding:
location / {
index.php index.html index.htm;

ADD this line: try_files $uri $uri/ /index.php;

So our wordpress website site works. Without the re-write above, nginx returns "not found" to the browser when wordpress loads a menu choice. So I found the server section in /var/www/vhosts/system/{domain_name}/conf/nginx.conf and added it. This is a temp patch
However, this is a generated file.

#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.



But the main nginx.conf in /etc/nginx/nginx.conf has no server section
So I need to change the server section of nginx.conf somewhere. Where is the source file I should be changing? Thanks so much.
 
Back
Top