Tomcat to achieve the domain name crm.test.com access

Label TomcatDomain access
258 people read comment(0) Collection Report
Classification:

**tomcat context, to achieve the effect, is in the browser to enter the IP or domain name can be accessed directly, not to enter the project name
Normal initialization isHttp://10.243.12.34:8080/plcrm, to become a direct access to crm.test.com. * *

1, remove the port number 8080

Add port mapping, because the 80 port can only be enabled root account, Tomcat account can not be enabled
-t NAT iptables -A PREROUTING -p TCP - dport 80 REDIRECT -j - to-port 8080


2, go to server.xml inside, changed to port= 8080, probably in the seventy-third line.

Port= protocol= "8080" HTTP/1.1 "<Connector"
ConnectionTimeout= "20000"
RedirectPort= "8043" / >

After this is completed, the basic can be usedHttp://10.243.12.34/plcrmCome for a visit.


3, to achieve a direct IP address access, the context map removed, to add Host in the server.xml

Configuration under Linux
Name= 10.243.12.34 "appBase=" webapps "<Host"
UnpackWARs= "true" autoDeploy= "true" >
<Context path = /sbdm/blog/ docBase= /sbdm/blog/usr/local/app/apache-tomcat-7.0.61_8080/webapps/plcrm /sbdm/blog/usr/local/app/apache-tomcat-7.0.61_8080/webapps/plcrm reloadable= "true" / >

</Host>

The following # is under the windows Tomcat server.xml configuration:
Name= 10.243.12.34 "<Host" appBase= "root" unpackWARs= "true" autoDeploy= "true": ""
<Context "path=" docBase= "D:\web\plcrm" reloadable= "true" / >
</Host>

This is completed, restart tomcat, you can enter the browser 10.243.12.34 access


4, to achieve the direct domain name access, the context map removed, to add Host in the server.xml

Configuration under Linux
Name= crm.test.com "appBase=" webapps "<Host"
UnpackWARs= "true" autoDeploy= "true" >
<Context path = /sbdm/blog/ docBase= /sbdm/blog/usr/local/app/apache-tomcat-7.0.61_8080/webapps/plcrm /sbdm/blog/usr/local/app/apache-tomcat-7.0.61_8080/webapps/plcrm reloadable= "true" / >

</Host>

The following is # windows Tomcat server.xml configuration
Name= crm.test.com "<Host" appBase= "root" unpackWARs= "true" autoDeploy= "true": ""
<Context "path=" docBase= "D:\web\plcrm" reloadable= "true" / >
</Host>

After this is completed, restart tomcat, you can enter the crm.test.com in the browser to access the.

top
Zero
step on
Zero
Guess you're looking for
View comments
* the above user comments only represent their personal views, does not represent the views or position of the CSDN website
    personal data
    • Visit1010601 times
    • Integral:Sixteen thousand one hundred and eighty-one
    • Grade
    • Rank:316th name
    • Original439
    • Reproduced:3
    • Translation:2
    • Comments:523
    My lessons
    Blog column
    Technology URL link
    Http://dev.mysql.com/doc/
    Latest comments