Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hey, everyone!
I have a site running on the 443 port using create-react-app and Express for the backend.
I have the following /etc/nginx/sites-enabled/default file
(Using validdomain.com to protect the privacy of my customers)
server {
listen 80;
server_name validdomain.com;
return 301 https://validdomain.com$request_uri;
}
server {
listen 443 ssl;
server_name validdomain.com;
ssl_certificate /etc/letsencrypt/live/validdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/validdomain.com/privkey.pem;
access_log /var/log/nginx/data-access.log combined;
# serve the static files
location / {
root /home/developer_account/customer-management/customer-management-fe/build;
try_files $uri /index.html;
}
location /api/ {
proxy_pass http://localhost:4000;
proxy_ssl_session_reuse off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_redirect off;
}
}
When I hit https://validdomain.com/ the location under the / index works perfect (this is the react app)
However, when I hit https://validdomain.com/api/admins/login or any other valid Express route, I get an error on the form:
Cannot POST /api/admins/login
When I ssh on my dropplet and use curl setting the proper params, and hit to http://localhost:4000/admins/login, it works perfect, including all the other Express routes I have!
I’m using pm2 (running without issues) and I’m not seeing any error on the pm2 service error.log
I’m using an Ubuntu 18.04 dropplet.
Could anyone point me on the right direction?
Thanks a lot!
009fd274aeae48f2bfbda6ef568676
Cloudstream Apk
032f50ee7f7d489db3b05e204fe139
032f50ee7f7d489db3b05e204fe139
Edward Sitarski
ebeecroft
dashan
34bcef38725b4e6eb5224ae028f17e
markatango
gouskova