Step 1 :- Create new project like /var/www/html/staging/blog
Step 2:- create index.php
Step 3:- Write <?php echo “Hello World”; ?> inside index.php
Step 4:- Check If you can access project via http://localhost/staging/blog. If you can see Hello World on your browser. Your are ready to create virtual domain
Step 5:- Add domain name in /etc/hosts file. e.g 127.0.0.1 blog.staging.local
Step 6: Open CLI Switch to sudo mode using sudo -i
Step 7:- Create copy using “cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/blog-staging-local.conf”
Step 8:- Edit /etc/apache2/sites-available/blog-staging-local.conf
0 Comment(s)