Just follow the below steps:
1. Open the terminal.
2. sudo –i
3. cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/test.mydomain.com.conf
4. gedit /etc/apache2/sites-available/test.mydomain.com.conf
Change DocumentRoot /var/www/html/test.mydomain.com
Add these lines:
ServerName test.mydomain.com
ServerAlias www. test.mydomain.com
5. a2ensite test.mydomain.com.conf
6. sudo service apache2 restart
7. apache2ctl -S
//will display list of host to your system
8. sudo gedit /etc/hosts
//Add your host name like
127.0.1.1 test.mydomain.com
Comments
Post a Comment