Article title: configure virtual host + SSL for Apache in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. download the httpd software and compile Apache:
. /Configure -- enable-ssl (to support SSL)
Make
Make install
2. in httpd. conf, set # Include conf/exta ...... Before vhosts. conf # Remove
Configure in vhosts. conf:
DocumentRoot: usr/local/w1
ServerName: www.shnu1.cn
Order deny, allow
Allow from all
(Add webpage access permissions)
3. add the following content to the hosts file in system32 of windows:
10.10.134.26 www.w1.com
10.10.134.26 www.w2.com
4. create w1.htmand w2.htm separately under w1and w2folders.
5. restart Apache: usr/local/apache2/bin/apachecl1 restart
6.ieaddress columns: enter w1.comand w2.comto test w1.htmand w2.htm.
7. generate a certificate
Cd/usr/local/apache2/conf
Openssl req-new-x509-nodes-out server. crt-keyout server. key
Open the httpd-ssl.conf configuration in httpd. conf.