Skip to content

Instantly share code, notes, and snippets.

@SiZapPaaiGwat
Last active November 19, 2021 19:10
Show Gist options
  • Star 43 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save SiZapPaaiGwat/ea128160c296f31e41e6 to your computer and use it in GitHub Desktop.
Save SiZapPaaiGwat/ea128160c296f31e41e6 to your computer and use it in GitHub Desktop.
webpack-dev-server configuration in nginx on development server
upstream ws_server {
server 127.0.0.1:8080;
}
server {
listen 80;
server_name 10.1.2.225;
location / {
proxy_pass http://ws_server/;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
@nqphuong
Copy link

This is helpful. Thanks.

@Fire-Dragon-DoL
Copy link

Thanks!

@rajatbarman
Copy link

Thanks :)

@RDelorier
Copy link

❤️

@sdykae
Copy link

sdykae commented Jul 30, 2019

Thanks it works <3 plus --public server_name

@fulicat
Copy link

fulicat commented Aug 23, 2019

Thanks :)

@bryan-hoang
Copy link

Thanks for the example!

@Joeycho
Copy link

Joeycho commented Jul 4, 2021

Hmm... In my case,

proxy_set_header Host $host; was needed. But thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment