My domain is on bluehost but my backend is on digital ocean. I need to assign admin.mydomain.com to 12.12.122.1:3000 lets say.
what should I do and is there any other way ?
Add the domain to your Digital Ocean account first then install nginx
on your server.
And use nginx
to forward your requests to node:
server {
listen 80;
server_name example.com;
location / {
proxy_pass 12.12.122.1: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;
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.