Is it possible to have two virtual host configurations for the same server - one with internal ip address and one with domain name(the domain name points to the same server with the internal ip address)? Something like
Example for a server A the domain name is a.com, internal IP is xxx.xxx.xxx.xxx and external ip is yyy.yyy.yyy.yyy. The document root is also the same for them /var/www/html
<VirtualHost xxx.xxx.xxx.xxx:80> ....... </VirtualHost> <VirtualHost a.com:80> ....... </VirtualHost>
Note that the internal IP address and the domain name belong to the same server or same server instance.
I am asking this to restrict some URLs for external users, redirect to https all external access and allow everything for internal users(without https).
Also they are for the same application...