![](https://ntorga.com/media/posts/2/apachelogo.png)
Fix Apache NAT Problem on cPanel
Since the update 11.58, I noticed that cPanel NAT solution wasn’t working with Apache on Amazon Web Services and Google Cloud Engine.
Apache was using the public IP on the VirtualHost instead of the instance local IP address and that does not work on providers that performs NAT outside the VM scope.
Solution
- WHM -> Server Configuration -> Basic cPanel & WHM Setup;
- On the “The IPv4 address (only one address) to use to set up shared IPv4 virtual hosts.” field, change the public IP to the internal IP;
- Save the page.
You’ll see that cPanel will change for the public IP again. However, you don’t have to edit again.
From now on, Apache will use the internal IP even with the public IP on the "Basic cPanel & WHM Setup".
I have my thoughts about why it happens, but since I don’t like to ask for support, that’s my way of fixing it. Do you have another solution?
Comments