By sirisaraweb
i have two domains.one droplet.and i have installed vestacp in it. so, now i want to make two domain with same content of website.when i update one directory.it must have to show on both domain.
example :
site.com/file.php = site.info/file.php
lets call the vestacp directory as ‘site’, when i update ‘file.php’ in ‘site’ directory.it must have to update both the site.com and site.info content.
i think this is clear.help me to make this work. one of my domain is in GoDaddy.
Thank You
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!
Welcome to digitalocean! If you would like to handle your droplet both domains to the same directory you need to take a few steps:
First of all you need to get in your DNS manager, here at DO or at your registrar, and redirect an A record to your droplets IP. So for example site.com --> 104.202.30.1 Do this for both domains. If you would like to create multiple domains/subdomains, just create a CNAME record.
Once there has been a DNS update, the domains will be redirected to your droplet. After you’ve done the DNS changes, you need to let your server handle the queries from people. It depends what kind of webserver you are using, but with most of the webservers (nginx, apache) you need to change your virtualhost / create a new one.
In the virtualhost configuration you need to let it handle the domains. In apache thats being done with:
<VirtualHost *:80>
ServerName domain1.com
ServerAlias www.domain1.com domain2.info www.domain2.info
</VirtualHost>
In nginx its being handled as following:
server {
listen *:80;
server_name domian1.com www.domian1.com domian2.info www.domian2.info;
root /var/www/website;
}
Hope this is enough information to get you started. If you need any more help in future just ask here or contact me on skype: cryptic-designs
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.