dunglas / frankenphp

🧟 The modern PHP app server
https://frankenphp.dev
MIT License
6.88k stars 235 forks source link

[QUESTION] How to use reverse proxy if we have mutliple sites #818

Closed ezekel closed 5 months ago

ezekel commented 5 months ago

Hi,

How can I use a reverse proxy if I have multiple sites?

In my docker-compose.yml I have 2 services having the same port and entrypoint but the host is different. as I know if we use octane we should have entrypoint like below.

     ports:
        - "80:80" # HTTP
        - "443:443" # HTTPS
        - "443:443/udp" # HTTP/3
      entrypoint: php artisan octane:frankenphp --max-requests=1 --host=api.mysite.online --port=443  --admin-port=2019 --https

Thank you in advance

withinboredom commented 5 months ago

You'd use a reverse proxy just like anything else. There's nothing special in regards to FrankenPHP in that respect.