http自动跳转至https
1、https配置参考:
https://www.cnblogs.com/best-jobs/p/3298258.html
https://blog.csdn.net/niejiangshuai/article/details/79282367
2、动态跳转或文件访问需要在httpd-ssl.conf中添加此配置:
Alias /web.files/ "D:/drosin/cms/project/wmsjzx/data/drosin_file//"
JkMountFile D:/drosin/cms/as/Apache2.2/conf/uriworkermapwmsjzx.properties
3、自动跳转规则配置:
<VirtualHost *:80>
ServerName your.domain.com
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/?(.*)$ https://%{SERVER_NAME}/$1 [L,R]
</VirtualHost>
以下是直接在httpd.conf配置
LoadModule ssl_module modules/mod_ssl.so
NameVirtualHost *:443
<IfModule mod_ssl.c>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
<VirtualHost _default_:443>
ServerName wmsj.heyangwmw.com
DocumentRoot /drosin/project/wmsjzx/webappsn/wmsjzx
SSLEngine on
SSLHonorCipherOrder on
SSLCertificateFile /drosin/as/apache/conf/ssl/2483535_sjzx.heyangwmw.com_public.crt
SSLCertificateKeyFile /drosin/as/apache/conf/ssl/2483535_sjzx.heyangwmw.com.key
SSLCertificateChainFile /drosin/as/apache/conf/ssl/2483535_sjzx.heyangwmw.com_chain.crt
Alias /web.files/ "/drosin/project/wmsjzx/data/drosin_file/"
JkMountFile /drosin/as/apache/conf/uriworkermapwmsjzx.properties
</VirtualHost>