1, modify httpd.conf
Note characters before the following two lines are removed: #LoadModule proxy_module modules/mod_proxy.so#loadmodule proxy_http_module modules/mod_proxy_http.so
2, adding proxy rules
At the end of the httpd.conf file, add a forwarding rule for example: Proxypass/baidu Http://www.baidu.comProxyPassReverse/baidu http://www.baidu.com will/ Baidu start of the request forwarded to the homepage
3, after the configuration file is changed, create the dockerfile in the sibling directory.
From Httpd:2.4.27copy./my-httpd.conf/usr/local/apache2/conf/httpd.conf
4. Build the Docker image and start the test
#!/bin/bashinstance=zlhttptestimage=zltestdocker rm-f ${instance}docker rmi ${image}docker build-t ${image}. Docker RUN-ITD--name ${instance}-P 8085:80 ${image}
Build a custom Docker image using the Apachehttp service's proxy feature