Create Virtual Host in Localhost

In this post, I'll discuss how you can create a virtual host for your Laravel project. Just follow the below steps for creating you, virtual host:

prerequisite: 

you should have knowledge about how to install Laravel projects. if you don't know then first learn to click here.

Steps:1
Go to your xampp/apache/conf/extra/httpd-vhosts directory and open this httpd-vhosts file. Add these line below mentioned.
=====================================================================
<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs"
    ServerName localhost
</VirtualHost>
========================================================================
<VirtualHost *:80>
DocumentRoot
"C:/xampp/htdocs/your_project_directory_name/public"
    ServerName your_domain_name.test
</VirtualHost>
========================================================================
Steps:2
Next after following step1, open another file host which is located in your windows c://window/system32/drivers/etc/host and add these line:
127.0.0.1 localhost
127.0.0.1 your_domain_name.test
=====================================================================
Steps:3
Next, restart your Xampp server and run your domain.
=====================================================================
Thank you :)

Comments

Post a Comment

Popular posts from this blog

User Active/Inactive using Jquery

laravel passport