![]() ![]() To do that open the from the following paths \xampp\apache\conf\extra\nf. So to run the laravel project from the virtual host we will give the path to the public folder. The entry point of a laravel application is the index.php inside the public folder, so the desired directory for our application will be the absolute path to your project in the public folder. Here 127.0.0.1 is the host on which you want to run your project and “laravel_proj.test” is the name of the URL on which you will run your project as a virtual host. Now add this line on the page like this: 127.0.0.1 laravel_proj.test so to have the admin rights just open this file with notepad ++. Remember to edit the host’s file using an editor with administrator rights, otherwise, you won’t be able to save the changes. You need to modify the host file of Windows located in C:\Windows\System32\drivers\etc\hosts. Visit the below link to download notepad ++ So this is step one first you need to download notepad++ as its easy for you to access the files with administrator rights in note pad ++ by following these steps you will be able to create your own virtual host Step 1 So the question is how you can create a virtual host now. The virtual host will give you the domain for your local on which you can run your project every time and that domain will be limited to your machine only and will not be public. ![]() If you have a virtual host for your projects you will not have to think about running the PHP artisan server every time you want to make changes to the project. If you found this tutorial helpful then don't forget to share.As we all know how much important it is to have a virtual host for any of your projects. Use php artisan serve command to run the development server. You need to install Composer on your system to create a Laravel project. In browser run localhost:8000 if have not set port otherwise run localhost:3421 with your set port number. F:\xampp\htdocs>cd laravel_projectį:\xampp\htdocs\laravel_project>php artisan serve -port=3421 Execute composer create-project laravel/laravel to php artisan serve command.Open Command Prompt and navigate to xampp/htdocs/ directory.Browser the php.exe location and Click Next. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |