By yWalker
i want to host first 2 domain in single droplet like domain1.com => /var/www/html/ and domain2.com=>/var/www/html/admin/
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!
This is very easy using apache virtual hosts
Follow these instructions to achieve what you want
sudo cp /etc/apache2/siates-available/000-default.conf /etc/apache2/sites-available/domain1.com.confServerName domain1.comErrorLog ${APACHE_LOG_DIR}/domain1.com_error.logDocumentRoot /var/www/html/CustomLog ${APACHE_LOG_DIR}/domain1.com_access.log combineddomain2.com.confdomain1.com with domain2.com also do not forget to change DocumentRoot to /var/www/html/adminsudo a2ensite domain1.com.conf, domain2.com.conf.sudo service apache2 restartNow you can use domain1.com to access the site at /var/www/html and domain2.com to access the site at /var/www/html/admin
Hope this helps, revert back here for any further questions.
What is your webserver of choice.
I personally use NGINX.
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.