Set cURL to use local virtual hosts

Actually, curl has an option explicitly for this: –resolve Instead of curl -H ‘Host: yada.com’ http://127.0.0.1/something use curl –resolve ‘yada.com:80:127.0.0.1′ http://yada.com/something What’s the difference, you ask? Among others, this works with HTTPS. Assuming your local server has a certificate for yada.com, the first example above will fail because the yada.com certificate doesn’t match the 127.0.0.1 … Read more

How to update /etc/hosts file in Docker image during “docker build”

With a more recent version of docker, this could be done with docker-compose and its extra_hosts directive Add hostname mappings. Use the same values as the docker run client –add-host parameter (which should already be available for docker 1.8). extra_hosts: – “somehost:162.242.195.82” – “otherhost:50.31.209.229” In short: modify /etc/hosts of your container when running it, instead … Read more

Using –add-host or extra_hosts with docker-compose

https://github.com/compose-spec/compose-spec/blob/master/spec.md#extra_hosts extra_hosts – Add hostname mappings. Uses the same values as the docker client –add-host parameter. extra_hosts: – “somehost:162.242.195.82” – “otherhost:50.31.209.229” An entry with the ip address and hostname will be created in /etc/hosts > inside containers for this service, e.g: 162.242.195.82 somehost 50.31.209.229 otherhost

Wildcards in a Windows hosts file

Acrylic DNS Proxy (free, open source) does the job. It creates a proxy DNS server (on your own computer) with its own hosts file. The hosts file accepts wildcards. Download from the offical website http://mayakron.altervista.org/support/browse.php?path=Acrylic&name=Home Configuring Acrylic DNS Proxy To configure Acrylic DNS Proxy, install it from the above link then go to: Start Programs … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)