Originally published byDev.to
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
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>
3. Uncomment if not already:
LoadModule rewrite_module modules/mod_rewrite.so
Include conf/extra/httpd-vhosts.conf
4. Restart Apache, then access via browser:
http://10.198.210.184 → Project 1
http://10.198.210.184:8001 → Project 2
http://10.198.210.184:8002 → Project 3
# or use localhost:port
FAQ
Can't access it? Check:
- Firewall → Allow incoming connections on ports 80, 8001, 8002
-
403 Forbidden → Ensure
AllowOverride AllandRequire all grantedare set, check folder permissions -
Routes not working → Ensure
mod_rewriteis enabled, verifyDocumentRootpoints to thepublicfolder
Need help building your app?
I'm available for freelance web & Android development — raflizocky.netlify.app
☕ Support my writing: paypal.me/raflizocky · saweria.co/raflizocky
🇺🇸
More news from United StatesUnited States
NORTH AMERICA
Related News
How Braze’s CTO is rethinking engineering for the agentic area
11h ago
Amazon Employees Are 'Tokenmaxxing' Due To Pressure To Use AI Tools
22h ago
KDE Receives $1.4 Million Investment From Sovereign Tech Fund
2h ago
Instagram’s new ‘Instants’ feature combines elements from Snapchat and BeReal
2h ago
Six Claude Code Skills That Close the AI Agent Feedback Loop
2h ago