By johns193


2017-07-31 15:02:09 8 Comments

I have a node server listening on localhost:8080 and I'd like to use nginx as proxy pass, so i made nginx listen to port 80 incoming connections. However I'm not able to configure nginx config to do the reverse proxying. I do not currently have a domain, only server IP. So I'm guessing server_name has to be set to $host or something?

events{

}
http{
 server{
     listen 80;    
     location / {
       proxy_pass http://127.0.0.1:8080;
       proxy_set_header Host 127.0.0.1;
}

  }
}

If I try to visit my server IP on port 80 I just receive welcome to Nginx page.

1 comments

@Ashish Kumar Sahoo 2017-07-31 15:52:03

You should reload and restart your nginx

sudo service nginx reload sudo service nginx restart

@johns193 2017-07-31 16:21:30

I'm using windows server, as stated in title.

Related Questions

Sponsored Content

21 Answered Questions

[SOLVED] Difference between proxy server and reverse proxy server

19 Answered Questions

[SOLVED] Getting git to work with a proxy server

2 Answered Questions

Keycloak Redirect url with nginx is going to http rather than https

  • 2018-04-03 12:02:15
  • Atulya Nair
  • 1037 View
  • 3 Score
  • 2 Answer
  • Tags:   nginx jboss

2 Answered Questions

2 Answered Questions

[SOLVED] Express - req.ip returns 127.0.0.1

1 Answered Questions

Nginx https proxy pass - zanata

  • 2018-01-18 17:30:08
  • mzibit
  • 91 View
  • 0 Score
  • 1 Answer
  • Tags:   nginx proxy

1 Answered Questions

[SOLVED] nginx reverse proxy best way to redirect

  • 2017-08-27 10:56:50
  • HuMaN-BiEnG
  • 194 View
  • 0 Score
  • 1 Answer
  • Tags:   nginx

2 Answered Questions

How to point many paths to proxy server in nginx

0 Answered Questions

nginx as reverse proxy in front of Liferay portal server

  • 2017-03-31 15:06:17
  • mdolphin
  • 462 View
  • 0 Score
  • 0 Answer
  • Tags:   nginx proxy liferay

2 Answered Questions

[SOLVED] nginx and trailing slash with proxy pass

Sponsored Content