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

Issue Azure Application Gateway - Hostname/Virtual Hosts not resolving

egoshake

New Pleskian
Server operating system version
CentOS7
Plesk version and microupdate number
Onyx 17.8
Hi,

Im using Azure infrastructure (Application Gateway, VNets and Virtual Machines) to create a mirror setup using CentOS7 Plesk Obsidian with a load balancer aka the Application Gateway for resilience.

Everything is configured properly, except Plesk is serving the default homepage files from /home/vhosts/default/htdocs on both instances, and I've been trying for 12 hours to understand why.

As I understand it, the VirtualHosts configuration serves the correct htdocs folder location, based on the headers in the request. I've ensured that the Azure infrastructure is passing all the original requests to Plesk, but the only way I have managed to get the correct site/domain to show is by manually editing the /etc/httpd/conf/plesk.conf.d/server.conf to manually use the correct folder location (e.g. /var/www/vhosts/mysite.org/htdocs) but this is problematic and not working properly when trying to serve includes from folders.

Please could someone shed some light on what possible problems could be causing this, and how exactly the request to Apache/nginx is passed to request the correct site?
 
If your question is about virtual hosts: Nginx is using name based virtual hosting. The correct subscription is selected by looking at the domain name for which the request is being sent to the server. The communication between Apache and Nginx is also name based, but internal only. When the default page is returned, probably the domain name cannot be read from the incoming request or it is not a name that is configured on the server.
 
Thanks for your reply, how would I adjust the names configured on the server or investigate the missing requests?
Also it is worth nothing that the address is a subdomain of our primary website, and it seems difficult to configure a subdomain in Plesk? It always shows a www. first when registering a new subscription.
 
Hi @egoshake.

I haven't touched on the application gateway that much yet but you would want to make sure you have a rule set up to forward the domain name as well within the request, this way the virtual domains is picked up. I can't remember if the Application Gateway is able to do such a thing but considering you can create rewrite conditions you should be able to do it.

Usually you won't use an application gateway for a Plesk instance since you're asking for trouble. You would usually have your main site configured for the routing then creating a rewrite rule to route, say, /images or /videos to a different pool of servers. You would usually just use a normal load balancer for that.

In either case, you'll want to make sure that the application gateway isn't scraping away the domain on the request, otherwise you'll get the default page because of how the web server is configured.
 
Back
Top