yum install mod_ssl -y
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout apache-selfsigned.key -out apache-selfsigned.crt
配置
ServerName xxx
Authtype Basic
Authname "Password Required"
AuthUserFile /httpd/http-pass-file.txt
Require valid-user
SSLEngine on
SSLCertificateFile httpd/apache-selfsigned.crt
SSLCertificateKeyFile httpd/apache-selfsigned.key
SSLProxyEngine on
ProxyPass / https://www.google.com.hk/
ProxyPassReverse / https://www.google.com.hk/
#密码文件创建
#htpasswd -c /home/lai/httpbasicpass admin