title: How to Serve HTML Files from a Nginx Server Using Docker
body: <p><strong>Problem</strong></p>
  
  <p>I have a Nginx container running in docker. It's configured to listen to port <a href="http://localhost:80" rel="noreferrer">http://localhost:80</a> . When I type the url to my browser I get the following... </p>
  
  <p><strong>Welcome to nginx!</strong></p>
  
  <p>If you see this page, the nginx web server is successfully installed and working. Further configuration is required.</p>
  
  <p>For online documentation and support please refer to nginx.org.
  Commercial support is available at nginx.com.</p>
  
  <p>Thank you for using nginx.</p>
  
  <p><strong>Cont'd of Problem</strong></p>
  
  <p>I want nginx to serve my html files from my public directory. Please take a look at my project images...</p>
  
  <p><strong>Project Images:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/EOIPV.png" rel="noreferrer">Project directory</a></p>
  
  <p><a href="https://i.stack.imgur.com/WbBVD.png" rel="noreferrer">Nginx Container Running</a></p>
  
  <p><strong>What I have done</strong></p>
  
  <ol>
  <li><p>Ran the following docker command from my public directory...</p>
  
  <ul>
  <li>$ docker run -d --name chat-web -v $PWD:/var/www -p 80:80 nginx</li>
  </ul></li>
  <li><p>Search for the location of nginx server from /usr/local/bin , /usr/private/var so that I can modify nginx.conf as described in the following post <a href="https://stackoverflow.com/questions/10674867/nginx-default-public-www-location">NGinx Default public www location?</a>. I was unable to find the location of the nginx server.</p></li>
  </ol>
  
  <p>Thanks in advance for taking the time to answer my question. I really appreciate you.</p>