Cloud Server (Ucloud) Deployment Java Web Project (vii) APACHEHTTPS forwarding to Tomcthttps

Source: Internet
Author: User

The steps are as follows:

(1) Cd/etc/apache2/mods-availalbe

CP rewrite.load ssl.conf ssl.load/etc/apache2/mods-enabled (load rewrite.load ssl.conf ssl.load)

(2) vi/etc/apache2/sites-available/default-ssl.conf (Configure Apache, add the following code:)

Sslproxyengine on

Sslproxyverify None
SSLPROXYCHECKPEERCN off
Sslproxycheckpeername off
Sslproxycheckpeerexpire off
Requestheader set Front-end-https "on"
Proxyvia on
Proxypreservehost on
Proxyrequests OFF

proxypass/https://127.0.0.1:8443/
proxypassreverse/https://127.0.0.1:8443/

<proxy *>
Order Deny,allow
Allow from all
</Proxy>
<location/>
Require all granted
</Location>

Rewriteengine on

Options +followsymlinks

Rewritecond%{server_port}!^8443$
Rewritecond%{http_host}!^www\. [NC]
Rewriterule ^ (. *) $ https://www.%{http_host}$1 [l,r=301]

(3) Save exit: Wq

(4) sudo apache2ctl configtest (test, if the reality OK, positive success, if error, may be associated file is not loaded into mods-enabled, follow step (1) load the corresponding file)

(5) sudo/etc/init.d/apache2 restart (restart Apache)

(6) Input: https://localhost:443 (if you see the Tomcat home page and HTTPS, the configuration is successful)

Cloud Server (Ucloud) Deployment Java Web Project (vii) APACHEHTTPS forwarding to Tomcthttps

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.