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

mstdmstd's avatar

How to config/run octane server with apache 2 virtual hosting used on local OS?

Installing octane into laravel 10 app I read at https://laravel.com/docs/10.x/octane#installation

php artisan octane:start

By default, Octane will start the server on port 8000, so you may access your application in a web browser via http://localhost:8000.

In .env I have options :

OCTANE_SERVER=swoole
OCTANE_HTTPS=false

I config/octane.php I changed the only option :

'server' => env('OCTANE_SERVER', 'swoole'),

with swoole as default server

So I run server at my local Kubuntu 22.04 with swoole option and have output :

$ php artisan  octane:start --server=swoole

   INFO  Server running…

  Local: http://127.0.0.1:8000

  Press Ctrl+C to stop the server

  200    GET / .......................................................................................................................................................... 36.51 mb 406.05 ms
  200    GET /rappasoft/laravel-livewire-tables/core.min.css ............................................................................................................ 36.73 mb 201.96 ms
  200    GET /_debugbar/assets/javascript ................................................................................................................................ 37.05 mb 42.89 ms
  200    GET /livewire/livewire.js ....................................................................................................................................... 36.82 mb 20.42 ms
  200    GET /rappasoft/laravel-livewire-tables/thirdparty.css .......................................................................................................... 32.34 mb 507.79 ms
  200    GET /rappasoft/laravel-livewire-tables/thirdparty.min.js ....................................................................................................... 32.44 mb 493.84 ms
  200    GET /_debugbar/assets/stylesheets .............................................................................................................................. 31.25 mb 555.89 ms
  200    GET /rappasoft/laravel-livewire-tables/core.min.js .............................................................................................................. 32.48 mb 84.90 ms
  403    POST /broadcasting/auth ........................................................................................................................................ 33.58 mb 137.75 ms
  500    POST /livewire/update .......................................................................................................................................... 36.93 mb 561.84 ms
  500    POST /livewire/update .......................................................................................................................................... 37.69 mb 398.16 ms
  200    GET /_debugbar/open ............................................................................................................................................. 36.77 mb 34.99 ms
  200    GET /_debugbar/open ............................................................................................................................................. 37.84 mb 24.31 ms
  500    POST /livewire/update .......................................................................................................................................... 36.96 mb 703.03 ms
  200    GET /_debugbar/open ............................................................................................................................................. 37.29 mb 38.78 ms
  200    GET / .......................................................................................................................................................... 36.99 mb 223.15 ms
  200    GET /_debugbar/assets/javascript ............................................................................................................................... 38.10 mb 107.11 ms
  200    GET /livewire/livewire.js ...................................................................................................................................... 35.94 mb 211.85 ms
  403    POST /broadcasting/auth ........................................................................................................................................ 36.52 mb 127.39 ms
  500    POST /livewire/update .......................................................................................................................................... 38.04 mb 461.04 ms
  500    POST /livewire/update .......................................................................................................................................... 38.71 mb 455.42 ms
  200    GET /_debugbar/open ............................................................................................................................................. 38.00 mb 34.73 ms
  200    GET /_debugbar/open ............................................................................................................................................. 36.74 mb 39.26 ms
  500    POST /livewire/update .......................................................................................................................................... 39.29 mb 533.20 ms
  200    GET /_debugbar/open ............................................................................................................................................. 39.35 mb 35.16 ms
  200    GET / .......................................................................................................................................................... 38.52 mb 209.01 ms
  200    GET /_debugbar/assets/javascript ............................................................................................................................... 38.10 mb 115.14 ms
  200    GET /livewire/livewire.js ...................................................................................................................................... 36.53 mb 239.70 ms
  403    POST /broadcasting/auth ......................................................................................................................................... 36.85 mb 86.86 ms
  500    POST /livewire/update .......................................................................................................................................... 38.99 mb 455.04 ms
  500    POST /livewire/update .......................................................................................................................................... 37.93 mb 462.53 ms
  500    POST /livewire/update .......................................................................................................................................... 39.61 mb 467.39 ms
  200    GET /_debugbar/open ............................................................................................................................................. 39.53 mb 35.85 ms
  200    GET /_debugbar/open ............................................................................................................................................. 37.01 mb 53.02 ms
  200    GET /_debugbar/open ............................................................................................................................................. 37.95 mb 55.51 ms

But running

http://127.0.0.1:8000

in url of my browser

I got error on my home page :

Target class [config] does not exist.

I do not run my local app

In .env I have options :

APP_URL=http://local-news-publishers.com

with apache 2 virtual hosting and I use it in browser.

How have I to change my site options with my apache 2 virtual hosting I use?

I did not find any similar option in config/octane.php... I reviewed some manuals but did not find how to config with apache 2 virtual hosting used ?

Searching in net I found similar issues :

https://github.com/barryvdh/laravel-debugbar/issues/1174 and https://packagist.org/packages/barryvdh/laravel-debugbar

and disabled with line :

DEBUGBAR_ENABLED = FALSE

in .env file and in config/octane.php added value

'flush' => [
    \Barryvdh\Debugbar\LaravelDebugbar::class,
],

But I got the same error. I did not find more info on this error with octane...

I tried to run internal laravel server with command :

php artisan  serve

and changed in .env :

APP_URL=http://127.0.0.1:8000

But running octane server I got error :

php artisan  octane:start --server=swoole
InvalidArgumentException
Unable to start server. Port 8000 is already in use.

?

0 likes
0 replies

Please or to participate in this conversation.