Possibly missing something in my conf file?

FrenchFry nginx-forum at forum.nginx.org
Thu Nov 2 21:01:59 UTC 2017


I'm a bit confused about what it is I need to get Nginx to serve requests
from my app server. I'm running inside a Vagrant box Ubuntu.  Nginx runs on
guest 80 and the server can be acccessed on 8080, while my app server (Thin)
runs on guest 8000 and host 4567.  Both are either localhost or 127.0.0.1. 


Problem is I am not seeing anything going on between the two servers.  I can
see my conf file played out if I go to localhost:8080, but nothing with port
4567. 

The reverse-proxy description doesn't sound like something I need since I
have no upstream servers.  All I want to do is serve up certain files that
exist outside of the site directory / public from another directory on my
machine.  TCP sockets is what I'm trying but I must be missing something.  

This is what I have so far in my conf file 

user                vagrant;
worker_processes    1;
error_log           /var/log/nginx/error.log debug;
pid                 /run/nginx.pid;

events {
  worker_connections 1024;
}

http {
  log_format main '$remote_addr - $remote_user[$time_local] $status '
    '"$request" $body_bytes_sent "http_referer" '
    '"$http_user_agent" "http_x_forwarded_for"';

  include /etc/nginx/mime.types;


server {
  listen      80;
  server_name 127.0.0.1:8000;
  rewrite_log  on;

  access_log   /var/log/nginx/access.log;

    location /audio/ {
      root /;
      sendfile       on;
      autoindex      on;
      tcp_nodelay    on;
      keepalive_timeout 65;
    }
  }
}

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,277180,277180#msg-277180



More information about the nginx mailing list