How to Fix a Multi-Site WAF That Serves the Wrong Upstream

●1 ●29 ●125
calendar_today • schedule3 min read

SafeLine is a self-hosted WAF built on nginx that protects web apps by acting as an HTTP/HTTPS reverse proxy: it receives traffic intended for the original site, drops malicious requests, and forwards safe traffic to the origin (Add Application guide). Because one instance sits in front of the network path, a single deployment can serve several sites. Each site is registered on the Applications page through three fields: Domain, Port, and Upstream. Domain is the name, hostname, or IP address of the original app; Port is the port SafeLine listens on; Upstream is the real address that SafeLine forwards to (Add Application guide).

The single mistake that breaks most multi-site setups is reusing the same Domain value across applications. Suppose you add two apps and type the SafeLine server IP into the Domain field for both, thinking it should identify the WAF itself. The Domain value is what SafeLine uses to match an incoming Host header to the correct application. When two entries share a Domain, every request matches the first entry and lands on its Upstream, so the second site silently renders the first site's content.

You can see the problem before touching any traffic. In the Web Admin Console, the Applications page lists every registered application with its Domain, Port, and Upstream. Two rows with identical Domain values, or a Domain that does not equal the hostname your visitors actually type, is the smoking gun (Add Application guide). In the browser, the symptom is just as direct: visiting the second hostname returns the first origin.

The fix is to make each Domain unique and make it match the exact Host header the browser sends. Edit each application so Domain is the site's real hostname, keep Port at 80, or 443 with the SSL option for HTTPS apps, and set Upstream to that site's actual origin address (Add Application guide). Finally, resolve each hostname to the IP address of the server where SafeLine is installed so all of them arrive at the WAF first (Add Application guide).

The confirming screen is easy to produce. After the correction, visit each hostname and confirm it returns its own origin rather than the shared one. Then run a documented attack sample against one site, such as the SQL injection test path shown in the Add Application guide. If SafeLine is truly in the request path, you will see its blocking page, and the console's attack list will show the event with a detail link (Add Application guide). That blocked request, together with each site returning its own content, is the confirmation that the multi-site reverse proxy is now routing correctly.

Can a single SafeLine instance protect several websites?

Yes. SafeLine is a reverse proxy in front of the origin servers, and each website is added as its own application with its own Domain, Port, and Upstream (Add Application guide). One instance can therefore sit in front of multiple origins.

Why does every site show the same page after I add multiple applications?

Usually because two or more applications share the same Domain value, so SafeLine matches all of them to the first application and its Upstream. Open the Applications page, look for duplicate Domain entries, and give each site its own hostname.

Does each website need its own listening port?

No. Port is the port SafeLine listens on, and multiple HTTP sites can share port 80 while HTTPS sites use 443 with the SSL option, because requests are matched by Domain first (Add Application guide).

How can I prove traffic is really flowing through SafeLine?

Resolve the hostname to the SafeLine server's IP address (Add Application guide), then send a documented attack sample. Seeing SafeLine's blocking page and a matching entry in the console attack list confirms the request passed through the WAF.

What is the fastest first check when one site returns another site's content?

Compare the Domain column on the Applications page for duplicate or mismatched values, verify each Upstream points at the correct origin, and confirm DNS points each hostname at the SafeLine IP address (Add Application guide).


SafeLine has surpassed 700,000 installations worldwide as of September 30, 2026. SafeLine Pro annual promotional pricing is $650-$880, compared with the regular $1,000 per year.

Want more #websecurity & #deployment deep dives?

Join 6,182+ developers sharing real benchmarks, code breakdowns, and projects. Free forever.

More Posts

Delivering Database Changes

Steve Fentonverified - Jul 22

A Textile Mill's Dyehouse Ramp Curve: Get One Step Wrong and the Sheet Belongs to the Master

aiomniu - Oct 18

How to Fix an HTTPS Upstream Proxy When SNI Is Not a Documented Control

Muzilla - Nov 5

Why I Use a Pre-Enablement Checklist for a Single WAF in Front of Multiple Sites

Lia - Nov 5

How to Add Domain, Port, and Upstream in a Reverse Proxy WAF

Muzilla - Nov 2
chevron_left
2.5k Points • 155 Badges
109Posts
0Comments
Web Dev

Related Jobs

Commenters (This Week)

7 comments
3 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!