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. Bad bad boy.
As far as I’m concerned, you don’t want to change the public IP to the internal IP every time some httpd.conf edition is made.
- 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?