一段完整的apache配置代码+apache配置ssl证书代码(强制http跳转到https)
<VirtualHost *:80>
DocumentRoot /www/web/lib_tag/public_html
ServerName lib.tag
ServerAlias www.lib.gg lib.gg
RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R,L]
ErrorDocument 400 /errpage/400.html
ErrorDocument 403 /errpage/403.html
ErrorDocument 404 /errpage/404.html
ErrorDocument 503 /errpage/503.html
CustomLog "logs/lib.tag_access_log" common
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile conf/cert/lib.tag.crt
SSLCertificateKeyFile conf/cert/lib.tag.key
SSLCertificateChainFile conf/cert/bundle_lib.tag.crt
SSLProtocol TLSv1 TLSv1.1 TLSv1.2
SSLCipherSuite EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5
DocumentRoot /www/web/lib_tag/public_html
ServerName lib.tag
ServerAlias www.lib.gg lib.gg
ErrorDocument 400 /errpage/400.html
ErrorDocument 403 /errpage/403.html
ErrorDocument 404 /errpage/404.html
ErrorDocument 503 /errpage/503.html
CustomLog "logs/lib.tag_access_log" common
</VirtualHost>
<Directory /www/web/lib_tag>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
亲爱的:被墙域名跳转TG:@qianhenetwork QQ:851617266,可否收藏+评论+分享呢?
文章评论 本文章有个评论