Nginx Load Balancer for Shlokas. This is a simple load balancer for the Shlokas project. It is a simple Nginx server that redirects requests to the backend servers.
Variable | Description | Default |
---|---|---|
BALANCER_ENV |
Environment. Should be dev or prod |
dev |
Path | Description |
---|---|
.logs |
Nginx logs. Error and access logs. |
.data |
SSL certificates should be placed in the .data directory. The file names should be server.crt and server.key for production. |
.container/run.sh
will start the server in development mode. This will start the server in port 80
and will redirect requests to the backend servers.
- Add
127.0.0.1 shlokas.dev
to/etc/hosts
: - Add
rootCA.rem
as a trusted root certificate. - Run
BALANCER_ENV=dev .container/run.sh
- Copy
server.csr
andserver.key
to.data
BALANCER_ENV=prod .container/run.sh
will start the server in production mode.