1. The default environment is apache, which listens to port 80 and serves the php environment. For example, how to configure tomcat and subdomain name resolution when accessing www.abc.com, so that the javaweb directory is accessed when accessing the subdomain name, for example, example.abc.com. ... 1. The default environment is apache, which listens to port 80 to serve the php environment.
For example, when you access www.abc.com, you can access the php Directory.
2. How to configure tomcat and subdomain name resolution so that the java web directory is accessed when accessing the subdomain name
For example, when you access example.abc.com, you can access the java web directory.
Answer
It should be emphasized that java and php should be resolved by tomcat and apache respectively, rather than configuring virtual directories and domain names in apache.
Modify question
Since we all reply to the use of reverse proxy, Which of the following is the most common method for implementing reverse proxy?
Reply content:
1. The default environment is apache, which listens to port 80 and serves the php environment.
For example, when you access www.abc.com, you can access the php Directory.
2. How to configure tomcat and subdomain name resolution so that the java web directory is accessed when accessing the subdomain name
For example, when you access example.abc.com, you can access the java web directory.
Answer
It should be emphasized that java and php should be resolved by tomcat and apache respectively, rather than configuring virtual directories and domain names in apache.
Modify question
Since we all reply to the use of reverse proxy, Which of the following is the most common method for implementing reverse proxy?
Because the two programs cannot listen to port 80 at the same time, it is not feasible to directly open the two programs. The solution is actually very simple: Only one program listens to port 80.
In your combination of Apache and Tomcat, you can link all websites to Apache. For websites that need to use Java, use Apache reverse proxy to Tomcat, in this way, Tomcat can access all websites without occupying port 80.
For more information, seeApache reverse proxy Tomcat
Technical documentation.
Bind different domain names and then forward
DocumentRoot "D:/web/www" ServerName www.test.com
Options FollowSymLinks Indexes AllowOverride All Order deny,allow Allow from 127.0.0.1 Deny from all Require all granted
DocumentRoot "D:/web/weiphp3.0_beta/weiphp" ServerName www.wei.com
Options FollowSymLinks Indexes AllowOverride All Order deny,allow Allow from 127.0.0.1 Deny from all Require all granted
DocumentRoot "D:/web/wx2share" ServerName www.tbgo.com
Options FollowSymLinks Indexes AllowOverride All Order deny,allow Allow from 127.0.0.1 Deny from all Require all granted
What does it mean to run multiple http Services? Multiple servers?
Apache proxy is the easiest way to forward data.
In the long run, the most standard is to build another server for routing, that is, the long-known Enterprise Service Bus esb.
Build an nginx reverse proxy. The proxy port is 80, and requests of different services are forwarded to the corresponding non-port 80 service through the proxy configuration.
Search
Nginx