Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

leostereo's avatar

How to set apache to serve idem like artisan serve command

Hi guys. I have a fresh apache running on centos 7 server. I have been deploying my laravel aps at /var/www/html folder. So , in order to access , i need to go on my browser for:

http://10.1.1.50/blog/public/index.php/products.

While if use "php artisan serve" I can reach the app doing: http://10.1.1.50:8000/products

What do i need to properly set my apache to handle 2 or more laravel apps on port 80 in similar fashion than artisan serve option ? BTW I understand , I need to point app public folder , but how to doit if I need to serve multiple applications ? Regards. Leandro.

0 likes
2 replies
Nakov's avatar
Nakov
Best Answer
Level 73

@leostereo here are couple of guides on how to setup a Laravel project on Apache:

https://phpraxis.wordpress.com/2016/08/02/steps-for-configuring-laravel-on-apache-http-server/

https://www.hostinger.com/tutorials/how-to-install-laravel-on-ubuntu-18-04-with-apache-and-php/

Btw, you cannot run php artisan serve from within two projects and both be accessible on the same port. While with apache you can, you just need to add the projects to the var/www/ folder and set them in your .conf files, the tutorials above shows you how to do it.

Please or to participate in this conversation.