title: NGINX web server configuration
body: <p>I've just downloaded NGINX for Windows and I'm struggeling a bit. 
  It's up and running with my index file showing at <em>127.0.0.1:8080</em>, but I'm having problems with connection my web server to my domain.</p>
  
  <p>From what I understand from the documentation I've read online, I had to change the DNS properties at my registrar like this (target-IP is my public IP):</p>
  
  <p><a href="https://i.stack.imgur.com/JwZIO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JwZIO.jpg" alt="DNS A property"></a></p>
  
  <p>Here is my nginx.conf file:</p>
  
  <pre><code>worker_processes  1;
  
  events {
      worker_connections  1024;
  }
  
  http {
      include       mime.types;
      default_type  application/octet-stream;
  
      sendfile        on;
  
      keepalive_timeout  65;
  
      server {
          listen       8080;
          server_name  erikbugge.no www.erikbugge.no;
  
          location / {
              root   www;
              index  index.html index.htm;
          }
  
          error_page   500 502 503 504  /50x.html;
          location = /50x.html {
              root   www;
          }
      }
  }
  </code></pre>
  
  <p>I have also port-forwarded port 8080 to my local IP address in my router. </p>
  
  <p>The problem now is that whenever I'm trying to access my webpage <em>www.erikbugge.no</em> it simply redirects me to my public IP address.
  I'm pretty sure I'm doing something wrong, but I have no idea what it is.</p>
  
  <p>Please be gentle, I'm new to this web server stuff.</p>