I\'m using hosting in linux and configured subdomain in my website in Apache2 server. I\'m using laravel but I didn\'t use apache2 service by default. I\'m using laravel artisan
I had the same issue, the real cause of the problem is this, somewhere along the line, the last parameter for the php -S
built in server was changed to a flag, so you have to call it like this:
php -S 127.0.0.1:8000 -t public -f serve.php
Before php 7.0.26 you could omit the -f
.
This is what happens under the hood when you call php artisan serve
.
If you want to serve it with php artisan serve
you will have to override the ServeCommand
and add -f
before the serve.php
ont the last line of the fire()
method, like this:
passthru('"'.PHP_BINARY.'"'." -S {$host}:{$port} -t \"{$public}\" -f server.php");
For more details look at this stackoverflow post.