-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 14.01.2016 14:34, Hongyi Zhao wrote:
1- Why must we use the ''-H 'Host: coolaj86.com' '' in this command for getting the correct result?
https://en.wikipedia.org/wiki/Virtual_hosting#Name-based
2- If I want to use internet explorer, such as firefox/chrome to open the corresponding url, i.e., http://localhost:3000/, how should I do?
Here are various ways depending on which parts of your infrastructure are under your control:
1. Your client machines need to connect (what they believe is) coolaj86.com to send this specific host name in the headers. You can achieve it with DNS or /etc/hosts (or equivalent) file.
2. You can rewrite HTTP headers with another software (stunnel won't do it for you).
3. You can reconfigure coolaj86.com to accept "localhost" as the host name for virtual server coolaj86.com.
Mike