Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

german77's avatar

Server redirect by user

I have 3 web servers X, Y and Z all with the same public domain. X server uses laravel/apache. Y and Z should not be accesible if on laravel you aren't logged in.

I want to use laravel as middleware to access Y and Z. And if your laravel auth expires then Y and Z should be inaccesible again. Also the domain should be the same without using different ports. for example: public.domain <- laravel server public.domain/Y/ <- Y server public.domain/Z/ <- Z server

Normal redirects only change the url of the webpage, meaning that anyone with the url have access.

0 likes
2 replies
mvdnbrk's avatar

Why would you have such a setup with three webservers?

german77's avatar

Each server do different tasks. With heavy workload. If I where to use one server I would need very expensive hardware.

The webpage is only an interface of what the server is doing on the backend. And It's a security risk to leave server X and Z open for the public.

Please or to participate in this conversation.