4. Configure EC2 (editing)
Last updated
Last updated
dnf install -y java-21-amazon-corretto-headlessdnf install -y nginx
systemctl start nginx
systemctl enable nginxvi /etc/nginx/conf.d/ourcompanylunch.confserver {
listen 80;
server_name ec2-13-125-239-165.ap-northeast-2.compute.amazonaws.com;
client_max_body_size 20M;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; # original request scheme: helps to distinguish http and https
}
}server_names_hash_bucket_sizevi /etc/nginx/nginx.confhttp {
...
server_names_hash_bucket_size 128;
...
}systemctl restart nginx