I’m trying to use Nginx on my Digital Ocean Droplet to display my Webflow site as a landing page at mysite.com, and make my node.js backend for a React app accessible at mysite.com/api/v1.
I’m having some trouble implementing this because I’m not sure how to send requests to Webflow with Nginx. Right now my /etc/nginx/sites-available/default file has the below configurations. When I go to mysite.com I get an error saying “mysite.com took too long to respond” or “couldn’t connect”. What’s wrong with this configuration?
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name mysite.com www.mysite.com;
location / {
proxy_pass http://webflowip;
}
location /api/v1/ {
proxy_pass http://dropletip/;
}