Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plesk nginx config for every domain and subdomain

I use Plesk and I have three domains and subdomains with different ngnix configs. At the moment I change the ngnix config in the /etc/ngnix/plesk.conf.d/vhost/manual after every update, because my changes are being overwritten by the httpdmng.

Now to my question; Can I create a separate template in /usr/local/psa/admin/conf/templates/folder for each domain?

Example: mydomain1 use the template from /usr/local/psa/admin/conf/templates/mydomain1/nginxDomainVirtualHost.php

mydomain2 use the template from /usr/local/psa/admin/conf/templates/mydomain2/nginxDomainVirtualHost.php

like image 627
Reto Arnold Avatar asked Oct 22 '25 15:10

Reto Arnold


1 Answers

In case someone come across this post, for plesk 12 you just create vhost_nginx.conf in the /var/www/vhost/DOMAINE_NAME/conf/ directory and then run /usr/local/psa/admin/bin/httpdmng to get the file included in last_nginx.conf

like image 184
elsadek Avatar answered Oct 24 '25 05:10

elsadek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!