Mvc hostname router and port

zend-mvc

#1

Hi,
I have ZF2 mvc application with hostname router config. Because I want to have several languages separated by 3rd level domain names. In my docker development environment I use non-standard port for web server. And there is a my problem:
When I use url view helper, I cannot get hostname with current port from request.

How can I use it? Is there anybody with working solution?

Thank you,
Rado.


#2

You’d probably need a port router added to the stack.

My suggestion is (for a local dev environment) to have a traefik in front of your servers, and run everything from a single load balancer at a standard port.

I wrote an example of that at https://gist.github.com/Ocramius/d44b9c500d3fd19e863c621500adeec0