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

Using a custom AJP ProxyPass as subdomain - vhost configuration?

Bombasstard

New Pleskian
Hello Folks,

I have been recently assigned being an adminstrator of a Plesk 12 managed web server running on Ubuntu Linux.

And I have a problem configuring something that is way off a "standard" application, so I am asking for help.

My problem:
I have a Java server application with an embedded Tomcat servlet container. As I already have an Apache Web Server running on this machine, I want to make use of the AJP protocol to connect these two web servers, running on port 8009.
So, on a standard Apache configuration I simply would add some VirtualHost configuration and that would be it:

Code:
<VirtualHost *:80>
   ServerName localhost
   ErrorLog /var/log/apache2/ajp.error.log
   CustomLog /var/log/apache2/ajp.log combined
   <Proxy *>
     AddDefaultCharset Off
     Order deny,allow
     Allow from all
   </Proxy>
   ProxyPass / ajp://localhost:8009/
   ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>

But, as I am running Plesk 12, this does not work that simple.
I tried several ways adding a subdomain via Plesk Configuration UI, but all I did manage was adding a heavily PHP backed folder below "/var/www/vhosts/$domain_name/$subdomain_name".
So, I found out vhost configuration for the Apache/Plesk combination lies in "/etc/apache2/plesk.conf.d/vhosts".

Going there, I edited the automatically created .conf file for my subdomain. Basically I deleted the whole Plesk configuration for this subdomain and replaced it with above ProxyPass/ProxyPassReverse settings, and it worked. So far, so good.

Alas, there is a nice warning inside of thes conf files:
Code:
#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.
#IF YOU REQUIRE TO APPLY CUSTOM MODIFICATIONS, PERFORM THEM IN THE FOLLOWING FILES:
#/var/www/vhosts/system/$subdomain_page/conf/vhost.conf
#/var/www/vhosts/system/$subdomain_page/conf/vhost_ssl.conf

I have already tried out that advice by creating such a vhost.conf file with my ProxyPass settings, but of no avail. So I got back to my manual edit described above.

So, I've got the impression that fiddling with these conf files manually is not that much of a good idea at all.
But I do not know how to do that "the correct way".

So, could you please help me? What am I supposed to do here?

Best regards
B.
 
Back
Top