I may be asking a stupid question here. But please bear with me.
I have 165.xxx.xx.xxx and DNS A Record value of mydomain.com is set to this IP address.
I have a subfolder /var/www/html/mysub-folder and wondering if it is possible to set a DNS A Record value of this subfolder to another domain name, anotherdomain.com.
Or do I have to use another droplet?
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!
Hello, @okadashinichi2819
You can host multiple websites on your droplet. You can point another domain’s A record to your droplet and then create the virtual host for the domain name and point it to the subdirectory as per your wish.
If you’re using Apache the following article will help you to create another virtual host:
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-18-04
A similar article for Nginx (the version is for Ubuntu 16.04, but the process is relatively the same):
Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.