for
php artisan serve
there's no need of vhosts. if you're using a vhost, then you may run your project directly by entering your vhost name you've created.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
wat is need for using ... vhost or php artisan serve . so far i have just been using 127.0.0.1/appfolder/public
am on laravel5.6 and using xamp
For creating a vhosts, Go to xampp/apache/conf/extra and open httpd-vhosts.conf and add these two things at the bottom:
<VirtualHost *:80>
Document Root "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
Document Root "C:/xampp/htdocs/lsapp/public"
ServerName lsapp.pro
</VirtualHost>
Save it. After that, open a Notepad as an Administrator. Click on File and select open. Then go to, C:/windows/System32/drivers/etc there you won't find any file, but hang on! From your dialog box select All files from the drop-down button near the Open button. Then you will see some files. Select hosts file and at the bottom add these two:
127.0.0.1 localhost
127.0.0.1 lsapp.pro
Please or to participate in this conversation.