Nginx configuration for Tomcat Web Applications - HaymonEdmur/DockerConfiguration GitHub Wiki
- In following configuration directory create your file
mywebapp.conf
# cd /etc/nginx/conf.d
- Application configuration
# cat /etc/nginx/conf.d/mywebapp.conf
server {
listen 81;
server_name nginx-hostname-dns;
location / {
proxy_pass http://BackendLinuxServer:####/;
}
location /xxx {
proxy_pass http://<Classic-Load-Balancer>:#/zzzz
}
location /zzz {
proxy_pass http://<Application-Load-Balancer>:#/yyyy
}
}
BackendLinuxServer can be EC2 instance or AWS internal load balancer
# nginx -t
# nginx -s reload