title: httpd: how to save 127.0.0.1:81 as a hostname in /etc/hosts
body: <p>I am using archlinux and installed systemd-nspawn container:</p>
  
  <p>The host and the containers both have httpd installed.</p>
  
  <p>In the host server the port is 80</p>
  
  <p>In the container server the port is 81</p>
  
  <p>What i observered is 127.0.0.1:80 refers to host and 127.0.0.1:81 refers to container. </p>
  
  <p>I think by default linux considers 127.0.0.1 as 127.0.0.1:80</p>
  
  <p>I thought of saving 127.0.0.1:81 as localhost in the /etc/hosts</p>
  
  <p>My file /etc/hosts in the container is as follows:
  127.0.0.1:81 gauranga
  127.0.0.1 nityananda</p>
  
  <p>When i try in the containers chroium <a href="http://gauranga" rel="nofollow">http://gauranga</a> it ways <code>This webpage is not available</code></p>
  
  <p>when i try in the containers chromium <a href="http://nityananda" rel="nofollow">http://nityananda</a> it works and shows the hosts /srv/http root directory contents</p>
  
  <p>how to resolve this.</p>