Apache Reverse Proxy

Source: Internet
Author: User
Tags docker ps docker run

one , create a docker container

Docker run--name 3001-p 3001:8080-v/usr/local/dockertomcat3001/webapps:/usr/local/tomcat/webapps-v/usr/local/ Dockertomcat3001/logs:/usr/local/tomcat/logs-m 512m-e java_opts= '-xmx512m '-D Tomcat

--------------------------------------------------------------------------------------------------------------

Docker run--name 3001-p:d ocker is named 3001

3001:8080-v: use 3001 This port number to monitor 8080 port 8080 for Tomcat Default Port

/usr/local/dockertomcat3001/webapps:/usr/local/tomcat/webapps-v path /usr/local/dockertomcat3001/ logs:/usr/local/tomcat/logs-d Tomcat

-M 512m-e java_opts= '-xmx512m ' can be used without

some Linux need to be in front of the command to add sudo
--------------------------------------------------------------------------------------------------------------

Related Commands :
Docker restart restart the Docker container . the container name .

Docker stop in the Docker container .

Docker start launches the Docker container .

Docker PS View all docker containers for the current system

Docker logs view logs for the current Docker container

Docker logs--tail=100 view Log last Bar

--------------------------------------------------------------------------------------------------------------

two , Apache reverse proxy

httpd-k install-n apache2.2 where "apache2.2" is the service name

( version different commands may not be the same )

Open Apache24\conf inside the httpd.conf file

Change Define Srvroot This is the path where the project is located . mine is in - Line .

The Listen is an apache Open Port . Use this port number to listen Tomcats

At the bottom , Proxypass and proxypassreverse are project Paths , in General , the two of them are the same. .

in Apache24\conf\extra this folder , there is httpd-ssl.conf This file , the default port inside is 443. If you have a second or 3 Apache , be careful not to repeat the port number

Apache Reverse Proxy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.