server_names_hash_bucket_size 512;
upstream node_app {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name www.abc.net;
location / {
proxy_pass http://node_app;
}
}
server {
listen 80;
server_name www.abc.net;
location / {
#proxy_pass http://node_app;
proxy_pass http://www.abc.com;
proxy_set_header X-Forwarded-Host $host;
}
}
server {
listen 80;
server_name g.abc.me;
location / {
#proxy_pass http://node_app;
proxy_pass http://www.abc.com;
proxy_set_header X-Forwarded-Host $host;
}
}
--stop nginx on windows--
nginx -s stop
--start nginx with config file
nginx -c ~/mynginx.conf
--testing nginx with config file, but not run
nginx -t -c ~/mynginx.conf
nginx -s reload