ckcc's avatar
Level 1

php artisan serve --port:80

Hi there, I'm new to Laravel. Running Laravel 5 on Ubuntu 15 PHP 5.6.4, Apache 2.4.10

I get that you should start up your server by running 'php artisan serve', but it sets it up at localhost:8000.

I want to be able to conveniently access it using a single URL without having to define a specific port (that is, to use port 80, and not force a different port in my config).

So, here's what's funny: I've set up Laravel in '/var/www/html/laravel/' and run 'php artisan serve' in that directory but the landing page is in 'localhost', not 'localhost/laravel'. The thing is, localhost has already been set up with the default Ubuntu/Apache page, which I want to preserve. If I attempt to run 'sudo php artisan serve --port:80', it tells me the address is in use, and rightly so.

Is there any way to run 'artisan serve' and have it run the server in 'localhost/laravel'?

0 likes
1 reply
pmall's avatar
pmall
Best Answer
Level 56

Is there any way to run 'artisan serve' and have it run the server in 'localhost/laravel'?

No.

The php server is for development purpose only. Just use localhost:8000 to develop you website localy.

If you want another setup you have to configure an apache/nginx vhost.

1 like

Please or to participate in this conversation.