Menu

Access Laravel Projects on a Local Network
πŸ–ΌοΈ

Access Laravel Projects on a Local Network

DEV CommunityΒ·Rafli ZockyΒ·6 months ago
#Fxj2WMto
#laravel#webdev#networking#php#xampp
Reading 0:00
15s threshold

Made for those tired of running php artisan serve locally. Examples with XAMPP and Laragon. Should work for other PHP frameworks too.

Steps

1. Place your Laravel projects in your web server directory:

# XAMPP C:\xampp\htdocs\project1

# Laragon C:\laragon\www\project1

Enter fullscreen mode

Exit fullscreen mode

2. Open httpd.conf and add:

# XAMPP Listen 8001 < VirtualHost *:8001 > DocumentRoot "C:/xampp/htdocs/project1/public" < Directory "C:/xampp/htdocs/project1/public" > AllowOverride All Require all granted </ Directory > </ VirtualHost > # Laragon Listen 8001 < VirtualHost *:8001 > DocumentRoot "C:/laragon/www/project1/public" < Directory "C:/laragon/www/project1/public" > AllowOverride All Require all granted </ Directory > </ VirtualHost >

Enter fullscreen mode

Exit fullscreen mode

3. Uncomment if not already:

LoadModule rewrite_module modules/mod_rewrite.so Include conf/extra/httpd-vhosts.conf

Enter fullscreen mode

Exit fullscreen mode

4.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.