Deploying Proxy with no Virtual Host

An API proxy is required to be accessible by other proxies (through LocalTargetConnection proxy chaining), but not accessible over any HTTP interface. To achieve this, I am deploying the child proxy with no <VirtualHost> defined in the proxy endpoint. The target in the parent proxy is then referencing the child proxy in its <LocalTargetConnection>. Both proxies deploy successfully and deliver the desired behaviour (send request to parent proxy and see request received by child proxy).

Is this by design or a bug? I'd like to ensure this is the intended behaviour.

Solved Solved
0 3 266
1 ACCEPTED SOLUTION

@Gagandeep Singh This behaviour of allowing the proxy to deploy without validating the existence of a Virtual Host is by design.


This is precisely to enable the invokation of a proxy via the proxy chaining feature wherein the invokation is managed within the message processor and does not have to go to the router (which needs the VH).

So, short answer - this is by design.

Is this expected to change ? - Don't have a precise answer for this, but there is no requirement to change it currently.

Hope this helps.

View solution in original post

3 REPLIES 3

Hi @Akash Prabhashankar ,

Virtual Host is mandatory for API proxy to be defined, otherwise, the deployment will fail. By design, it is mandatory to provide the virtual host.

Now, to achieve what you want (your internal proxy should not be accessible over HTTP to public), you can create a new virtual host (such as "Internal-Only") and give this virtual host name in the chained API proxy instead of your HTTP virtual host.

This is explained in detail by @arghya das in his post here.

If you are using Edge-OnPrem, you can create a Virtual Host. Refer this documentation

For Edge Cloud Installation, you can contact Apigee Support for this.

Hope this helps!

@Gagandeep Singh This behaviour of allowing the proxy to deploy without validating the existence of a Virtual Host is by design.


This is precisely to enable the invokation of a proxy via the proxy chaining feature wherein the invokation is managed within the message processor and does not have to go to the router (which needs the VH).

So, short answer - this is by design.

Is this expected to change ? - Don't have a precise answer for this, but there is no requirement to change it currently.

Hope this helps.

@Akash Prabhashankar, @Gagandeep Singh

Sorry for replying to a quite old post. Sharing my observations about this topic

1. Virtual host is not mandatory for an API proxy to be defined. A proxy can be deployed without a virtual host configuration in proxy endpoint.

2. Deploying a proxy with no Virtual Host defined in the proxy endpoint does not necessarily mean that the proxy is not exposed over any http interface to public.

3. If a proxy is not referring to any specific virtual host then virtual host with name 'default' (if present) is applied to that proxy automatically and it can get exposed over http/https as per 'default' virtual host configuration.

Hi @Dino-at-Google , @Anil Sagar @ Google-

Please confirm if my understanding above is correct and share your inputs.

Thank you!