title: Can't be accessed from outside the local server using Nginx
body: <p>I'm a newbie to Nginx, on my VPS, there's no problem to get nginx to work locally when I ssh to it,</p>
  
  <p>curl -v localhost or curl -v 127.0.0.1</p>
  
  <p>but it can't be accessed outside the VPS</p>
  
  <p>curl -v 58.215.176.164 or curl -v markson.hk</p>
  
  <p>here is my conf file</p>
  
  <pre><code>user  www-data www-data;
  worker_processes  2;
  
  #error_log  logs/error.log;
  #error_log  logs/error.log  notice;
  #error_log  logs/error.log  info;
  
  #pid        logs/nginx.pid;
  
  
  events {
      worker_connections  1024;
  }
  
  
  http {
      include       mime.types;
      default_type  application/octet-stream;
  
      #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;
  
      #keepalive_timeout  0;
      keepalive_timeout  65;
  
      #gzip  on;
  
      server {
          listen       80;
          server_name  www.markson.hk;
  
          #charset koi8-r;
  
          #access_log  logs/host.access.log  main;
  
          location / {
       root   /usr/local/src/html;
              index  index.html index.htm;
          }
  
  
  
          error_page   500 502 503 504  /50x.html;
          location = /50x.html {
              root   html;
          }
  </code></pre>
  
  <p><strong>update-----------------</strong></p>
  
  <p>all the web services outside the local server are not working, I tried sinatra, riak.</p>
  
  <p>same thing, can't access outside the local server</p>
  
  <p>I took some advice from the first person who answered my question, the ufw is not active, and i can ssh to the vps, which means the port 22 is open,  so I don't think it's due to the firewall.</p>
  
  <p>I think the problem dues to ip forwarding or some sort?</p>
  
  <p>Anyone can give me some clue or provide some reading materials about the ip forwarding and linux network configuration?</p>