GCP Load Balancer with DirectAdmin

iamscruffy

New member
Joined
Apr 3, 2025
Messages
2
Hello!

Do you have any experience using a VM with DirectAdmin and a GCP Passthrough Load Balancer?

I recently set up a new VM at GCP, and it works perfectly without the load balancer.

I can connect to the VM when using the Load Balancer with Passthrough (TCP ports 80 & 443), but it will not resolve to any of the sites. For example: If I use www.mysite1.com, or www.mysite2.com, I can see that the "webserver is functioning normally." Without the LB, it works perfectly as it should.
(Side note: I also tried allowing All Ports just to experiment)

I was going to use the load balancer for added protection, so I hope one of you might have an idea. Or should I scrap the Load Balancer and go direct to the VM, provided I limit the exposure of the VM through the Firewall?

Thanks in advance for any suggestions or help!
 
I greatly appreciate the feedback. I found that the GCP Load Balancer is using the internal network IP (IPV4) for the VM instead of the public IP. DirectAdmin is working perfectly with the public IP. I suspect that since the LB uses the internal network IP, all traffic is going to the Apache root directory. What is the best method in DirectAdmin to forward the root Apache traffic so it sees and resolves the URLs set up in DirectAdmin? I'm guessing a small change for htaccess and/or using a modrewrite (/etc/httpd/conf/httpd.conf)? If so, where specifically? I figure it's better to ask first than to break it first.

Thanks again!
 
Back
Top