0

My development environment is in a docker container, based on CentOS. I have 2 virtual hosts configured. A default vhost which looks basically like this:

<VirtualHost *:443>
  ServerName my.local.domain.com
  ServerAlias *.domain.com

And a specific vhost

<VirtualHost local.otherdomain.com:443>
  ServerName local.otherdomain.com:443

On my hosts machine /etc/hosts look like this:

127.0.0.1   localhost my.local.domain.com test.local.domain.com local.otherdomain.com

The container's hosts file is managed by docker, as it is by default.

Now I'm facing following issue: Every call from the outside world (host system) works like a charm, but internal calls don't work. Like this one:

curl --insecure -X POST https://test.local.domain.com/rest/balance

I have own ssl_access logs for both virtual hosts and I can see that internal requests use the wrong (local.otherdomain.com) vhost instead of the other one. As already said, it works for calls from the host machine.

Any idea how that's possible?

Daniel
  • 101
  • 1

1 Answers1

0

I still have no clue why it didn't work, but i changed the configuration to:

NameVirtualHost *:443
<VirtualHost *:443>
  ServerName my.local.domain.com
  ServerAlias *.domain.com

and

<VirtualHost *:443>
  ServerName local.otherdomain.com:443

and it works now

Daniel
  • 101
  • 1