About Apache configuration with IP multi-domain support for HTTPS and 80 jump HTTPS

Source: Internet
Author: User

Configuration of the Httpd-ssl:

Listen 443

Namevirtualhost *:443

AddType Application/x-x509-ca-cert. CRT

AddType application/x-pkcs7-crl. CRL

Sslpassphrasedialog builtin Sslsessioncache "Shmcb:/usr/local/apache/logs/ssl_scache (512000)"

Sslsessioncachetimeout 300

Sslmutex "File:/usr/local/apache/logs/ssl_mutex"

<virtualhost *:443>

DocumentRoot "/xxxx/span"

ServerName resource-pov.xxx.com

Sslengine on Sslciphersuite all:! Adh:! Export56:rc4+rsa:+high:+medium:+low:+sslv2:+exp:+enull

Sslcertificatefile "/USR/LOCAL/APACHE/CONF/SSL/SERVER.CRT"

Sslcertificatekeyfile "/usr/local/apache/conf/ssl/server.key"

</VirtualHost>

<virtualhost *:443>

DocumentRoot "/xxxx/pov.xxx.com"

ServerName pov.xxx.com

Sslengine on

Sslciphersuite all:! Adh:! Export56:rc4+rsa:+high:+medium:+low:+sslv2:+exp:+enull

Sslcertificatefile "/USR/LOCAL/APACHE/CONF/SSL/SERVER.CRT"

Sslcertificatekeyfile "/usr/local/apache/conf/ssl/server.key"

</VirtualHost>

Configuration of the httpd-vhosts.conf:

Namevirtualhost *:80

<virtualhost *:80>

ServerAdmin [email protected]

DocumentRoot "/xxxx/span"

ServerName resource-pov.xxx.com

Serveralias resource-pov.xxx.com

<ifmodule mod_rewrite.c>

Rewriteengine on

Rewritecond%{server_port} 80

Rewriterule ^ (. *) $ https://resource-pov.xxx.com/$1 [r=301,l]

</IfModule>

Errorlog "Logs/resource-pov.xxx.com-error_log"

Customlog "Logs/resource-pov.xxx.com-access_log" common

</VirtualHost>

<virtualhost *:80>

ServerAdmin [email protected]

DocumentRoot "/xxxx/pov.xxx.com"

ServerName pov.xxx.com

Serveralias pov.xxx.com

<ifmodule mod_rewrite.c>//This ifmodule mod_rewrite.c is open redirect Jump module, will all 80 access to HTTPS, if not like jump can choose to remove <ifmodule mod_ Rewrite.c>. </IfModule> this paragraph.

Rewriteengine on

Rewritecond%{server_port} 80

Rewriterule ^ (. *) $ https://pov.xxx.com/$1 [r=301,l]

</IfModule>

Errorlog "Logs/pov.xxx.com-error_log"

Customlog "Logs/pov.xxx.com-access_log" common

</VirtualHost>

About Apache configuration with IP multi-domain support for HTTPS and 80 jump HTTPS

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.