Skip to main content

Posts

Showing posts with the label vhosts

How to put different host entries on same linux server, for different virtual hosts? [closed]

The setup is : Two applications are hosted on same linux server using vhost entries in apache configuration. say : http://greatapp.example.com and http://superapp.example.com Both of them have a functionality where they do server side http request to a third url (using php cURL / file_get_contents) : http://apis.example.com Now there is a host entry of an in the hosts file '/etc/hosts' xx.xx.xx.xx apis.example.com This is only intended for greatapp.example.com code, and not for superapp.example.com. How to configure the server such that greatapps.example.com uses the host entry, but superapp.example.com uses the public ip of apis.example.com