sexta-feira, 28 de janeiro de 2022

Multi domains

 nginx.conf

events {
	worker_connections 1024;
}
http {
	server {
	  listen 80;
	  server_name cats-n-cookies.com;
      proxy_pass  http://127.0.0.1:3000;
    }
    server {
      listen      80;
      server_name dogs-n-cookies.com;
      proxy_pass  http://127.0.0.1:3001;
    }
}

docker container run \
	--net=host \
    -v $(pwd)/nginx.conf:/etc/nginx/nginx.conf \
	nginx:alpine

/etc/hosts

27.0.0.1       localhost
# ADD ENTRIES BELOW
127.0.0.1       cats-n-cookies.com
127.0.0.1       dogs-n-cookies.com
# END

# keep rest of the file as is
# ...

Nenhum comentário:

Postar um comentário