简体   繁体   中英

which Apache server will it use?

Lets us consider a case, there are 2 apache server running, and one domain is available. if we make a request like this, http://domain1.com/example1.php it should request one apache server where actual domain is present. When http://domain1:8000/example1.php it should point to a application in a another server (other machine) under a same domain group.

Now a question is, if http://domain1:8000/example1.php is requested, then it will run in which server? which server will interpret it? which server will execute those files, either apache server in domain1 system or, a apache server that domain1:8000 (this is other machine, to which request is port forwarded) points?

服务器将侦听特定的端口,因此,如果您使用其他端口,则它将转到该端口侦听的任何服务器,而与域无关。

Since you're using port forwarding, then it can only be processed by where ever you forward the ports to. So, port 80 is being forwarded to your main server and port 8000 to the other server. If you didn't forward, and all were going to the first server, then you would get an error if the first server were not also listening on port 8000.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM