Add internal IP address to existing Virtual Host?
I have a Linux CentOS 7.2 server with Apache 2.4 whose httpd.conf is created/maintained by WHM 60.0 build 31.
The httpd.conf file has a Virtual Host section for one of my websites that looks like:
...
Everything runs fine.
Now, I need to allow an internal IP access to this Virtual Host. I know this can easily be done as described here,
VirtualHost Examples - Apache HTTP Server Version 2.4
in the third section (titled, "Serving the same content on different IP addresses (such as an internal and external address).") by modifying the httpd.conf file to look like:
...
However, I suspect WHM will overwrite this upon restarting the Apache web server, etc.
How can I accomplish extending a Virtual Host to an internal IP address within the confines of WHM controlling httpd.conf?
-
Hello, The following document offers instructions on how to preserve custom changes to individual VirualHost entries: Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation Let us know if this helps. Thank you. 0 -
Yes, I currently use include files for my existing virtual hosts. However, I don't believe this answers my question. For example, how could I modify this existing VirtualHost ... to become ... using an include file? 0 -
Hello, While it's supported by Apache 2.4, I don't believe cPanel/WHM will recognize multiple IP addresses assigned to a single Virtual Host. I recommend opening a feature request if it's an option you want to see configurable in WHM: 1:1 NAT - Documentation - cPanel Documentation Thank you. 0
Please sign in to leave a comment.
Comments
3 comments