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

Redis image

Short-term memory for faster
AI agents 🤖💨

AI agents struggle with latency and context switching. Redis fixes it with a fast, in-memory layer for short-term context—plus native support for vectors and semi-structured data to keep real-time workflows on track.

Start building

Top comments (0)

AWS Q Developer image

What is MCP? No, Really!

See MCP in action and explore how MCP decouples agents from servers, allowing for seamless integration with cloud-based resources and remote functionality.

Watch the demo

đź‘‹ Kindness is contagious

Sign in to DEV to enjoy its full potential—unlock a customized interface with dark mode, personal reading preferences, and more.

Okay