Home > Net >  How will be deployed on a server, 2 sites on a domain name
How will be deployed on a server, 2 sites on a domain name

Time:09-16

Assuming that a situation,
I have two sites, a server, a domain name, domain name www.abc.com
One site binding server port 8080, the domain name www.abc.com
Another site binding server port 8081, why don't you add a domain name, realize the second site visit
How to set up the second site access address is set to www.abc.com/site2, can achieve?

CodePudding user response:

The reverse proxy, such as nginx, is dedicated to do this in,
But you need to make sure that the first site no/site2 this directory,

CodePudding user response:

reference 1/X - I - n reply:
reverse proxy, nginx, for example, is dedicated to do this in,
But you need to make sure that the first site no/site2 this directory,

Ok, thank you
Had been heard of nginx, also want to use nginx, but don't know, didn't also the actual used
This is to learn the nginx

CodePudding user response:

CodePudding user response:

Have to do is to do with 3 floor

CodePudding user response:

The
reference 3 floor wanghui0380 response:


The
reference 4 floor hands on the keyboard to knock very light response:
just follow 3 floor do


At first I use add IIS originally on the default website can be access to the site

Add back behind my web site, then add site will not be able to access the
Error:
HTTP error 403.14 - who
The Web server is configured to not list the directory content,
I don't know which didn't pay attention to deployment time?

CodePudding user response:

In the application as directory to add applications such as 3 l

CodePudding user response:

refer to 6th floor wearing a treble response:
directory to add the application with the application as 3 l

Unable to access, whether you need other Settings?

CodePudding user response:

refer to 7th floor GreAmbWang response:
Quote: refer to the sixth floor wearing treble response:

In the application as directory to add applications such as 3 l

Unable to access, whether you need other Settings?


Have the

CodePudding user response:

Site.abc.com, both sites can bind port 80, should also can be achieved,

CodePudding user response:

Binding port 80, using a domain name www.abc.com
Divided into two entrances

CodePudding user response:

You are separate different port, it can be used different port visit,

Also can through the different secondary domain name, also is not necessarily visit two web sites with the WWW,

CodePudding user response:

According to the different application, set different host first try?
And then let the DNS provider the two domain name resolves to the same IP;

CodePudding user response:

Written in nginx, location, with the return instructions url can return to port 8081

CodePudding user response:

reference 13 floor stevenux reply:
use nginx, write a location, with the return instructions to return to port 8081 url can
location/another_site {
Return to http://IP:PORT;
}


Visit http://www.abc.com/another_site to access to the second site

CodePudding user response:

The general change the configuration file, you can configure the access to the root directory of different port 80, 8080, can also according to the path of the request configuration.

CodePudding user response:

Domain name on a computer with you deploy actually, there is no direct relationship between the two sites, domain name is the external visitors through DNS protocol (client through all sorts of routing strategy and equipment support), convert the domain name for your computer's IP address, and then the client directly with IP: Port in the form of a visit your website, so you deploy 100 websites on the computer, actually is also use Port Numbers to distinguish between web applications, didn't have anything to do with domain name,

As for IIS may can be configured on a specific "host", it's web application wants to go to the extra filtering compare the client request message in the message domain name, is an additional request, you can put the host header is set to no. *, so as to fit any domain name,

CodePudding user response:

Deploy the site, as long as you consider good port number distribution, do not consider the domain name,
  • Related