I am developing a custom chatbot for a WordPress website. I built the chatbot backend using python-fastapi and ran it via uvicorn app:app --host 0.0.0.0 --port 8000
on ubuntu24.04 instance.
Everything works well when I test it using Postman. However, I need to call the chatbot backend on my WordPress website.
I don't know about WordPress plugins, so I developed an HTML-CSS-JS embed code for the WordPress site. I tried to access the fastapi backend in JS code.
But, I can't access it because the WP site is in HTTP protocol and the Ubuntu instance is in HTTPS protocol.
I want to access the fastapi backend via https protocol.
What I tried:
I tried to install nginx, but couldn't install it. I got the following error:
root@ip-172-31-53-161:/home/ubuntu# sudo systemctl start nginxJob for nginx.service failed because the control process exited with error code.See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.
someone told me to buy a new domain and I purchased a new one. but couldn't solve it.
I am new to AWS and Nginx. Please help me!