Monday, 11 May 2015

Creating subdomain on Digital Ocean

Directory
  1. html refers to main site.
  2. demo , blog outside html (folder) refers to subdomain.
1. Create a directory from command line
  1. sudo touch /var/www/your-directory
2. Create a conf file on location /etc/apache2/site-available/
  1. sudo touch /etc/apache2/sites-available/your-directory-name.domainname.com.conf
  2. Just copy 000-default.config data to newly created file above by below command
  3. sudo cp /etc/apache2/sites-available/000-default.conf
  4. /etc/apache2/site-available/your-directory-name.domainname.com.conf
  5. open file for edit
  6. sudo nano /etc/apache2/sites-available/your-directory-name.domainname.com.conf
  7. and replace
  8. DocumentRoot /var/www/your-directory-name
  9. sudo service apache2 reload.
  10. sudo service apache2 restart.
3. After above proceee go to amazon hosted zone just follow below steps.
  1. Create a records set put name of your choice in name required fields
  2. Put www.yourdomain.com. in value and save records set. it will take 10-15 min to process by amazon.

No comments: