Apache2 Implementing HTTPS Access HTTP service

Source: Internet
Author: User

I. Background requirements

1, Development colleague Nodejs development project, node Index.js open 9003 service port monitoring service, now need external HTTPS access to the service

2, build apache2 service

1) 80 Port HTTP access, configuration/etc/apache2/sites-enabled/000-default.conf

<virtualhost *: the>proxypreservehost on ServerAdmin [email protected] ServerName deploy-cn.domains.com DocumentRoot/home/guyan/www/watchfaces directoryindex homepage.htm index.htmlLogin. htm proxypass/http://127.0.0.1:9003/Proxypassreverse/http://127.0.0.1:9003/</VirtualHost> <directory"/home/guyan/www/watchfaces">Options Indexes followsymlinks allowoverride None Order allow,deny allow from all</Directory>

2) 443 port HTTPS access, requires configuration 1) 80 port HTTP access, configuration/etc/apache2/sites-enabled/001-ssl.conf

<virtualhost *:443>ServerName Deploy-cn.huami.com<proxy>Order Deny,allowallow from all</proxy>sslengine onsslproxyengine onsslproxyverify nonesslproxycheckpeercn offsslproxycheckpeername Offsslcertificatefile"/ETC/APACHE2/SSL/HUAMI.COM.CRT"Sslcertificatekeyfile"/etc/apache2/ssl/huami.key"proxyrequests offproxypreservehost on Proxypass/http://127.0.0.1:9003/Proxypassreverse/http://127.0.0.1:9003/</virtualhost>

Apache2 Implementing HTTPS Access HTTP service

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.