• 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!
  • 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 adding <VirtualHost with alternative port in Apache config

T0nio

New Pleskian
Greetings,

I have searched the forum but have not found a unique solution for my question: I'm on Plesk Onyx and have nginx activated. I would like to add "<VirtualHost xxx.xxx.xxx.xxx:8004>" and "<VirtualHost xxx.xxx.xxx.xxx:8005>" entries to the Apache config to have Apache listening additionally on these ports and directing requests to a certain directory containing PHP files.
Editing the /var/www/vhosts/system/mydomain.com/conf/httpd.conf is not an option for known reasons ("#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,") and adding the entries to a vhost.conf in that directory results in an error as the include directive sits within the default "<VirtualHost ..." entry. I hope I have not overlooked an obvious solution and have expressed myself clearly.

Thank you very much in advance

Tonio
 
Thanks Igor for the answer, yes I have. I have read it once again right now and still don't get it. vhost.conf, vhost_ssl.conf and vhost_nginx.conf which relate to the "Additional directives" entry fields in Plesk (Plesk actually creates the .conf files from that content) are all included in the default sections: <VirtualHost xx.xx.xx.xx:7081 > (vhost_ssl.conf into httpd.conf), <VirtualHost xx.xx.xx.xx:7080 > (vhost.conf into httpd.conf) and likewise for vhost_nginx.conf which is then included in the corresponding "<VirtualHost xx.xx.xx.xx:443/80" sections in nginx.conf. And I get an error when I add my "<VirtualHost xxx.xxx.xxx.xxx:8004>" section in there because it is already within a "<VirtualHost xxx.xxx.xxx.xxx:>" section. How do I get my stuff included in these files on the "top level", outside the default "<VirtualHost xxx.xxx.xxx.xxx:*>" sections?
 
Well, I have now made my changes manually to httpd.conf and my project works fine as expected. With the downside that the changes will be lost, when editinng things from withing Plesk. There HAS to be a way to achieve this from within Plesk - or isn't this possible?
 
Back
Top