Kamleshpaul / setup-laravel-with-frankenphp

Run laravel project without install any software like php, composer
12 stars 2 forks source link

How To Run with worker mode #1

Closed Fliw closed 2 months ago

Fliw commented 2 months ago

Hey, thanks for creating this, i've installed franken php on my root directory, this is the mechanism :

  1. Nginx is port forwarding 80 / 443 to 69, i still need Nginx as my default webserver, however it works, i can access my laravel by port forwarding, when i use php info it says my SAPI is FrankenPHP
  2. i have created Caddyfile and modify as below :
    
    {
      frankenphp
      order php_server before file_server
      auto_https off
    }

http://myweb.com:69 { root * public/ encode zstd gzip php_server { resolve_root_symlink worker { num_workers 2 max_request 500 } } }


3. i'm try to run with command ./frankenphp run and it works, however i don't think it uses a worker
4. so i'm decided to run with ./frankenphp php_server --domain http://myweb.com:69 and it return `Error: loading new config: http app module: start: listening on :443: listen tcp :443: bind: address already in use`
5. im already force the https off because i've self-signed certificate in my nginx, and it works without the worker mode
6. i've run ./frankenphp run --worker and it says `unknown flag: --worker`

so, what must i do to solve this and use worker mode?
Kamleshpaul commented 2 months ago

may be add you nginx config so i can convert this into caddy

port. 69 need to forward to domain or you are using domain with port to access your application?

Fliw commented 2 months ago

hi, thankyou for helping, BTW i've solved this issue by using laravel octane and not standalone library, it works like a charm 🪄