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.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Thank you for this wonderful guide. As a beginner I really appreciate it.
I wanted to read more about the proxy directives under location. For those interested documentation can be found here
Great concise guide! Just one addendum: configuration steps on how to host multiple domains on the same server/IP for Apache and Nginx.
Step 3 — Installing PM2, this ended up failing for me …
<user>@ubuntu-s-1vcpu-1gb-tor1-01:~$ sudo systemctl start pm2-<user> Job for pm2-<user>.service failed because the service did not take the steps required by its unit configuration. See “systemctl status pm2-<user>.service” and “journalctl -xe” for details.
I’m stuck on “Start the service with systemctl:” “sudo systemctl start pm2-sammy” (used my user)
I receive Job for pm2-sammy.service failed because the service did not take the steps required by its unit configuration. See “systemctl status pm2-ula.service” and “journalctl -xe” for details.
How to solve it?
cant anyone tell me, what sould i do if nginx always redirect me to “welcome to nginx” page. but when i test it with curl command everything is ok. here are my server block setting:
$ curl http://localhost:3000
server {
listen 80;
listen [::]:80;
root /home/myname/node-app;
server_name *.mydomain.com;
location / {
proxy_pass http://localhost:3000;
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;
}
}
thanks, and i hope you helped me out!
What’s the proper location to store your backend Node files?
In your user’s home directory (/home/user) as this this tutorial does?
Is it still possible to serve static files after NGINX has been set up as a reverse proxy server?
Awesome guide and thank you so much for the time and effort put into it.
A possible needed edit (on 18.04 anyway):
I had to add trailing slashes to the NGINX proxy location and URLs in order for it to work properly. I.e.:
location /app2/ {
proxy_pass http://localhost:8080/;
....
}
Otherwise I would get the “Cannot Get” error.
Thanks again!
I have a reverse proxy for two locations / and /services
server {
...
location / {
proxy_pass http://localhost:3000;
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;
}
location /services {
proxy_pass http://localhost:3001;
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;
}
...
}
And there are two NodeJS APIs one is listening on port 3000 and the other on 3001. Whenever I send a request to example.com/services it gets handled by both apps. I want it to get handled only by the second app listening on port 3001. How do I achieve that?