Ex1)
upstream uptest {
server <some_lambda_id>.lambda-url.ap-northeast-2.on.aws:443;
keepalive 100;
}
server {
listen 80;
#access_log off;
access_log /var/log/nginx/uptest_acc.log main;
error_log /var/log/nginx/uptest_err.log error;
server_name <test_domain>;
location / {
proxy_pass https://uptest;
}
}
Ex1 is not work (403 forbidden and body response : {"Message":null})
Ex2)
server {
listen 80;
#access_log off;
access_log /var/log/nginx/uptest_acc.log main;
error_log /var/log/nginx/uptest_err.log error;
server_name <test_domain>;
location / {
proxy_pass https://<some_lambda_id>.lambda-url.ap-northeast-2.on.aws;
}
}
Ex2 is work
What is the difference between 'proxy_pass url' and 'proxy_pass upstream' in Nginx ? How to fix 'Ex1' code?
Thanks for your time. Regards