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.

Hi Folks,
I am new to digital ocean platform and nginx, I have setup a droplet which serves an angular app seamlessly, however I want to serve multiple angular apps from one digital-ocean droplet based on URL/path.
for an example
abc.com/app1 -----> ~/app1/index.html abc.com/app2 -----> ~/app2/index.html
and so on.
Please refer following configuration I have for my sites-available/abc.com
server {
root /home/alok/abc-web;
index index.html index.htm index.nginx-debian.html;
server_name abc.one www.abc.one;
try_files $uri $uri/ /index.html;
location /app1/ {
alias /home/alok/abc-web/app1/dist/;
try_files $uri /index.html;
}
location /app2/ {
alias /home/alok/abc-web/app2/dist/;
try_files $uri /index.html;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/abc.one/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/abc.one/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = abc.one) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name abc.one www.abc.one;
return 404; # managed by Certbot
}
I have replaced abc.com with actual domain name I used.
I understand its more of an Nginx config issue than a digital-ocean droplet issue.
Thanks in advance.
Nodas
Deepak surya
jeromealbrecht
1466724ccb4143be9d72ab00239be6
FriendlyLapisWhale
Mor Sagmon
gianmarcosanti
Jashuva
AdorableElectricBlueAnchor
AdorableElectricBlueAnchor
OchiWerks