Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multisite with binary #862

Open
te-deum opened this issue Jun 10, 2024 · 4 comments
Open

Multisite with binary #862

te-deum opened this issue Jun 10, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@te-deum
Copy link

te-deum commented Jun 10, 2024

Describe you feature request

I would like to know if it's possible to host multiple website with the FrankenPHP binary like Caddy can do with a JSON configuration file ?

My project use Laravel and is a SPA with Vue. I use a load balancer as reverse proxy to manage TLS connexion to my project. I actually use Nginx as HTML server and everything is working well.

I want to try and test FrankenPHP but I can't get multiple site working with the binary. I try to give a config JSON file without success :-(
Here is the simple JSON that I try :

:8081 {
    root * /data/app/public
    encode zstd gzip br
}

:8082 {
    root * /data/demo/public
    encode zstd gzip br
}

:8083 {
    root * /data/beta/public
    encode zstd gzip br
}

Any idea if it's possible to do what I want ?

@te-deum te-deum added the enhancement New feature or request label Jun 10, 2024
@withinboredom
Copy link
Collaborator

If you are running them all on different ports, why not run a separate process for each of them?

@nickchomey
Copy link

I'm not OP but I suspect that the ports don't need to be different - they just happened to implement it that way while figuring things out. Assuming that they could all use the same port, the question still remains - can you have multiple sites in a frankenphp binary?

@dunglas
Copy link
Owner

dunglas commented Jun 15, 2024

Yes. It's just a Caddy module, all Caddy features are supported.

@rikwillems
Copy link

@te-deum see the Caddyfile that FrankenPHP uses: https://github.com/dunglas/frankenphp/blob/main/caddy/frankenphp/Caddyfile

You can use the environment variable CADDY_EXTRA_CONFIG to inject what you want. Or mount your own Caddyfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants