title: Redirecting with nginx redirects to localhost in Windows
body: <p>I am trying to redirect my dns to ip through nginx via its config file and file in sites-enabled folder, 
  But it is always redirect to nginx homepage showing 'Welcome to nginx!'.</p>
  
  <p>My configuration files include:</p>
  
  <p><strong>NGINX.CONF</strong></p>
  
  <pre><code> user  www-data www-data;
      worker_processes  4;
  
      #error_log  logs/error.log;
      #error_log  logs/error.log  notice;
      #error_log  logs/error.log  info;
  
      pid        var/run/nginx.pid;
  
  
      events {
          worker_connections  1024;
      }
  
  
      http {
          include       mime.types;
          default_type  application/octet-stream;
          include /conf/*.conf;
          include /conf/sites-enabled/*;
  
      #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
      #                  '$status $body_bytes_sent "$http_referer" '
      #                  '"$http_user_agent" "$http_x_forwarded_for"';
  
      #access_log  logs/access.log  main;
  
      sendfile        on;
      tcp_nopush     on;
      tcp_nodelay    on;
      #keepalive_timeout  0;
      keepalive_timeout  65;
      types_hash_max_size 2048;
      gzip  on;
      gzip_disable    "msie6";
  
      server {
          listen       80;
          server_name  fe.paytm.com;
  
          #charset koi8-r;
  
          #access_log  logs/host.access.log  main;
  
          location / {
              root   html;
              index  index.html index.htm;
          }
  
          #error_page  404              /404.html;
  
          # redirect server error pages to the static page /50x.html
          #
          error_page   500 502 503 504  /50x.html;
          location = /50x.html {
              root   html;
          }
  
          # proxy the PHP scripts to Apache listening on 127.0.0.1:80
          #
          #location ~ \.php$ {
          #    proxy_pass   http://127.0.0.1;
          #}
  
          # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
          #
          #location ~ \.php$ {
          #    root           html;
          #    fastcgi_pass   127.0.0.1:9000;
          #    fastcgi_index  index.php;
          #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
          #    include        fastcgi_params;
          #}
  
          # deny access to .htaccess files, if Apache's document root
          # concurs with nginx's one
          #
          #location ~ /\.ht {
          #    deny  all;
          #}
      }
  
  
      # another virtual host using mix of IP-, name-, and port-based configuration
      #
      #server {
      #    listen       8000;
      #    listen       somename:8080;
      #    server_name  somename  alias  another.alias;
  
      #    location / {
      #        root   html;
      #        index  index.html index.htm;
      #    }
      #}
  
  
      # HTTPS server
      #
      #server {`enter code here`
      #    listen       443 ssl;
      #    server_name  localhost;
  
      #    ssl_certificate      cert.pem;
      #    ssl_certificate_key  cert.key;
  
      #    ssl_session_cache    shared:SSL:1m;
      #    ssl_session_timeout  5m;
  
      #    ssl_ciphers  HIGH:!aNULL:!MD5;
      #    ssl_prefer_server_ciphers  on;
  
      #    location / {
      #        root   html;
      #        index  index.html index.htm;
      #    }
      #}
      }
  </code></pre>
  
  <p><strong>conf file inside sites-enabled folder</strong></p>
  
  <pre><code> server {  
       server_name   my.domain.com; 
        root C:/Users/some/absolute-path/public;
        index index.html index.htm; 
  
       access_log /var/log/nginx/my-domain.access.log; 
        error_log  /var/log/nginx/my-domain.error.log; 
        underscores_in_headers on; 
        location /   {  
           root C:/Users/some/absolute-path/public;      
           proxy_pass http://localhost:8997;
        }
      }
  </code></pre>
  
  <p>The host entry for the ip is also done:</p>
  
  <pre><code> 127.0.0.1  my.domain.com
  </code></pre>
  
  <p>What is there that I am missing or doing wrong</p>