• 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!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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.

Question Plesk nginx coexistence with own nginx configurations

Juergen Schneider

New Pleskian
Server operating system version
Ubuntu 22.04
Plesk version and microupdate number
Plesk Obsidian Web Admin Edition Version 18.0.68 Update #2
Hi all, I like Plesk very much and use the browser based web access as well. However I do have a couple of own nginx and node.js based websites, which I migrated into the Plesk Server (Linux Ubuntu 22.4). My sites use also node.js and the setup is not that easy than I want to change it right now. For that I have a couple of own xxx.conf in /etc/nginx/conf.d beside your zz010_psa_nginx.conf. I would like to co-exist with the Plesk website. In zz010 Plesk includes the /etc/nginx/plesk.conf.d/server.conf, which always takes port 80 and 443 over my websites resulting in an invalid certificate (plesk instead of mine). I temporarily changed the server.conf to make my and Plesk website running fine. However Plesk will overrule these changes again, e.g. when Plesk renews its certificate (I guess). So my question is there an easy way that my websites and the Plesk website (which I like) can simply co-exist avoiding any further integration of my existing sites into the Plesk nginx settings. For example I could change the zz010.. conf, but this may be overwriten as well. Any advice ?
 
Thanks Kaspar, will have a deeper look, and my quick first review sounds like my solution. I want to minimize the risk of an outage in particular for my 'business' Web Page and actually since everything is running, actually on the first shot I want to disable the automatic rebuild until I have your proposed final solution. Is that is possible ?
 
You can customize the nginx configuration by creating custom template for the nginx configuration. More info can be found on the Plesk documentation page: Changing Virtual Hosts Settings Using Configuration Templates
Kaspar, thank you so much, I think with this templating approach, I can solve my problem.. you can mark this query as resolved. Looking a bit further, I am still struggling why this ever happened, resulting in a server_name _;. I found the template code here..

<?php if (!$VAR->panel->isDefaultAccessDomain) { ?>
server_name <?= $VAR->quote($VAR->panel->accessDomainName) ?>;
<?php } else { ?>
server_name _;
<?php } ?>

How can I correctly set the $VAR->panel settings.

Thanks again !
 
I am not sure what you're trying to accomplish? What exact setting are you trying to access in the template?
 
Hey Kaspar thanks, actually I have the Template running fine and the rebuild now produces a server.conf in which the server_name is not just _; but has the correct domain name. See the attached file.
But your question is very good.. I am still struggling why I had this problem and what I made wrong initially, meaning I have now a running system, although I don't know what went wrong initially.
 

Attachments

  • Screenshot 2025-04-09 at 19.37.20.png
    Screenshot 2025-04-09 at 19.37.20.png
    213.5 KB · Views: 2
Back
Top