해외축구중계스포츠중계축구중계EPL중계스포츠무료중계실시간스포츠
{"id":873,"date":"2018-03-08T19:57:02","date_gmt":"2018-03-08T19:57:02","guid":{"rendered":"https:\/\/www.wdb24.com\/?p=873"},"modified":"2018-04-22T19:51:27","modified_gmt":"2018-04-22T19:51:27","slug":"configure-virtual-host-laravel-xampp","status":"publish","type":"post","link":"https:\/\/www.wdb24.com\/configure-virtual-host-laravel-xampp\/","title":{"rendered":"Configure Virtual Host for Laravel in XAMPP"},"content":{"rendered":"

In my previous post we have successfully installed laravel on xampp<\/a> and tested via php artisan serve command. Artisan is the command line interface included in laravel. We will discuss more about artisan in my upcoming posts. SO if you want read by yourself then visit Artisan Console<\/a> on official laravel documentation.<\/p>\n

But this means every time I want to run laravel, I have to use artisan serve command?<\/p>\n

No no, You can also access laravel by hitting localhost\/laravel_folder_name\/public<\/code>. In our installation tutorial I renamed laravel folder to my_site<\/code>. Below is the screenshot in which laravel site is showing using localhost\/my_site_public<\/p>\n

\"laravel<\/a><\/p>\n

By default laravel uses public\/index.php<\/code> to jump into its eco system. But using localhost\/laravel_folder_name\/public<\/code> may create some internal linking problem in development.<\/p>\n

To overcome this issue most of the PHP developers (including me) create virtual host<\/a> for localhost . According to wikipedia<\/a>:<\/p>\n

\nVirtual hosting is a method for hosting multiple domain names<\/a> (with separate handling of each name) on a single server (or pool of servers). This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same host name.\n<\/p><\/blockquote>\n

Configure Virtual Host for Laravel in XAMPP:<\/h2>\n

Now you know what is Virtual Host<\/strong>. Now lets configure virtual host for laravel in xampp. I will create virtual host as mysite.laravel<\/code>. There are 2 steps involve which are.<\/p>\n

    \n
  1. Add\/point Virtual host entry in httpd-vhosts.conf<\/code> file. This file normally falls in xampp\\apache\\conf\\extra<\/code> folder.<\/li>\n
  2. Point Virtual host entry to hosts<\/code> file. Hosts file path is C:\\Windows\\System32\\drivers\\etc\\<\/code> on windows. <\/li>\n<\/ol>\n
    \n<\/ins>
    \n