DEV Community

Cover image for SafeLine WAF Setup: How to Handle Multiple Apps on Port 80
Carrie
Carrie

Posted on

1 1 1 1 1

SafeLine WAF Setup: How to Handle Multiple Apps on Port 80

📍 Problem description

You have two applications:

  • App 1 → deployed on Server A, port 80
  • App 2 → deployed on Server B, port 80

When you try to configure both behind SafeLine WAF, you get the error:

Duplicate applications detected on port 80: *
Enter fullscreen mode Exit fullscreen mode

Image description

The reason for this error is:

SafeLine allows only one listener on port 80 on the frontend.
If you define multiple applications with the same frontend port (80) but without separation, SafeLine cannot determine which backend to forward requests to.

✅ How to solve it

Since SafeLine currently does not support path-based routing, the only supported solution is domain-based routing.

Use different domain names (recommended)

For example:

  • App 1 → app1.example.com → Server A:80
  • App 2 → app2.example.com → Server B:80

In SafeLine:

  • Configure one listener on port 80
  • Set routing rules based on the Host header (domain name) to forward traffic to the correct backend server.

This way, SafeLine knows exactly which application the request is meant for.

⚠️ Why you can’t use multiple port 80 listeners

  • SafeLine can only bind to port 80 once on the frontend.
  • Multiple port 80 listeners will always result in a duplicate port error.
  • Path-based routing (/app1, /app2) is currently not supported in SafeLine.

🚀 Summary recommendation

✅ Use different domain names and set up Host-based routing in SafeLine.
❌ Do not attempt path-based routing — SafeLine does not support it.
❌ Do not configure multiple port 80 listeners — it will cause errors.

SafeLine Website: https://ly.safepoint.cloud/ShZAy9x
Github: https://github.com/chaitin/SafeLine
Discord: https://discord.gg/dy3JT7dkmY

Retry later

Top comments (0)

Retry later
Retry later