dns - domain.com needs to be re routed to IP_ADDRESS:8080 nginx config weird configuration -


i have following configuration in nginx conf file domain

server { listen 80;  server_name domain.com  location / {     proxy_pass http://localhost:8080;     proxy_set_header  host http://domain.com;     proxy_cache_bypass $http_upgrade;  } 

}

and when got domain.com -> nothing have append :8080 , bam! app fine

however, want able redirect domain.com -> localhost:8080 app running.

how can fix in nginx config file under sites-available

thank you,

have /nginx/sites-available conf file following afterward make symbolic link @ /nginx/sites-enabled/

 server { listen 80;  server_name domain.com;  location / {     proxy_pass http://localhost:3000;     proxy_set_header  host $host;     proxy_cache_bypass $http_upgrade;  } } 

inside javascript file

create server private ip addr of server not local host following

//change ip address form localhost private ip address of server app.listen(3000, '192.241.191.56', function () {   console.log('example app listening on port 3001!'); }); 

Comments