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

Deploy behind reverse proxy #40

Open
marcocaberletti opened this issue Jul 31, 2020 · 2 comments
Open

Deploy behind reverse proxy #40

marcocaberletti opened this issue Jul 31, 2020 · 2 comments

Comments

@marcocaberletti
Copy link

Hi!
I should deploy many different WhatsApp API instances behind a reverse proxy, using different paths to route the traffic.
Every instance is a different host with a docker-compose stack.

So, for example:

my.domain.example/client-1 ---> instance-1
my.domain.example/client-2 ---> instance-2

I try to do this setup, but I get this error:

app.ERROR: [b278a05bed9347d9b0295ebaf9da6e75] Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /client-1" (uncaught exception) at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php line 2 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /client-1\" at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php:2, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/client-1\". at /var/www/html/vendor/symfony/routing/Matcher/UrlMatcher.php:2)"} []

Can you help me?

@mengyiyuan
Copy link
Contributor

@marcocaberletti can you elaborate more on how you set up these different instances?

  1. are they using the same db host? if so, you need to set the WA_DB_HOSTNAME env var according to https://developers.facebook.com/docs/whatsapp/guides/mysql
  2. is each instance running with a different phone number?

@marcocaberletti
Copy link
Author

@mengyiyuan
in my setup, every instance is independent. Every instance is a EC2 instance with its own DB and run with different phone number.
Currently, I create a new DNS name for every instance:

client-1.domain.example --> instance-1
client-2.domain.example --> instance-2

My goal is to use a single DNS name and use a different path to "select" the client:

wa.domain.example/client-1 --> instance-1
wa.domain.example/client-2 --> instance-2

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

No branches or pull requests

2 participants