One domain - two webservers

Started by mindblowing, Feb 15, 2023, 03:33 AM

Previous topic - Next topic

mindblowingTopic starter

The plan is to have 2 servers - one for the main site which will offer hosting services, and the other for a panel containing various sites.

Is there a way to execute this plan on a single domain of the main site, without having to alter the ns servers of the existing sites? Alternatively, would it be necessary to use 2 separate domains?


It's possible to set up a proxy at the virtual server level by using specific configurations such as proxy_pass. An example of a configuration for nginx is shown below:

upstream admin_backend {
    server max_fails=10 fail_timeout=20s;

server {
    location /admin {
        proxy_pass admin_backend;

The above code indicates that if a user access url /admin, then the request will be forwarded to the second server without requiring a second domain. Similar solutions might also exist for Apache.


So, if I understand correctly, you'll have two IP addresses at your disposal? One possible solution could be to host the panel on a different domain for easier management. For example, you could put your main site on www.mydomain.local and the panel on www.something.mydomain.local.

To achieve this, you could set up a redirect using the first web server when a user requests www.mydomain.local/something/. However, it's important to consider whether this increased load is necessary and whether it aligns with your goals.


Yes, it is possible to execute this plan on a single domain for the main site without having to alter the ns servers of the existing sites. One approach could be to use subdomains for each server. For example, you can set up the main site on "" and the panel containing various sites on "".
This way, you can keep the existing sites on their current domain and utilize subdomains for the new services. Alternatively, if you prefer to use two separate domains, you can register a new domain for the panel and keep the existing domain for the main site.


Can anyone give example to one domain-two webservers.
Software Development Company