Using Nginx as a proxy for Node.js

Config file should look like this:

upstream api_domainname {
server {
        listen   80;

        access_log  /var/log/nginx/api_domainname_access.log;

        location / {
                proxy_pass      http://api_domainname;
                include         /etc/nginx/proxy.conf;

Any requests coming in on port 80 for the server name specified will be routed to your NodeJS server.

Leave a Reply

Your email address will not be published. Required fields are marked *