Open automatix opened 3 years ago
Resolved... ) I forgot to change the entry in the hosts
of my host system:
127.0.0.1 app.loc
Now it works.
I'm reopening this issue, since there is still one thing, I cannot explain to myself:
The new address app.loc
only wokrs, if it's registered in the hosts
file. The old address works independently of the hosts
. I can register it there, can remove, can set the address to -- the old one works in every case. Why? Is there a kind of cache? And why doesn't it work for the new address the same way?
Hi @automatix,
I think this is because the symfony.localhost
server name is hard coded into the nginx configuration here: https://github.com/eko/docker-symfony/blob/master/nginx/symfony.conf#L2
Maybe we could use server_name _;
to have a catch-all domain names (see: http://nginx.org/en/docs/http/server_names.html).
Hi @eko,
is there any reason why nginx is not configured to serve the symfony application directly as the default server?
If this were possible it would no longer be necessary to modify the hosts
file !
PS
Could be useful customizing the server_name
(currently hard coded) on nginx configuration symfony.conf
?
Hi,
(Context: Windows 10.)
I was a bit unhappy with the naming and changed some names, e.g. the log files names or the database name. I'm going to create a PR later. Anyway, the last station on this road was the URL. So I changed the value of the
server.server_name
configuration in thesymfony.conf
from "symfony.localhost" to "app.loc". ThenBut no effect. The container can still be found under
symfony.localhost
. OK, then I removed all containers, images, volumes, and networks, cleared the build cache, executeddocker system prune
(which is actually not needed, when all the objects have already been removed by running specific commands -- but just in case).Then I rebuilt and started the containers again.
But I still cannot reach the application under the new address. And the old one is still working. How is it possible? How to get the change applied?