利用Apache强制使用https访问
2013-05-08 17:58
477 查看
1.首先配置Aapache 支持https访问,Apache开启mod_rewrite模块
2.打开httpd-vhosts.conf文件
<VirtualHost *:80>
RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R,L]
ServerAdmin webmaster@localhost
DocumentRoot /home/server/www
ServerName a.test.local
ErrorDocument 404 /error.php
</VirtualHost>
2.打开httpd-vhosts.conf文件
<VirtualHost *:80>
RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R,L]
ServerAdmin webmaster@localhost
DocumentRoot /home/server/www
ServerName a.test.local
ErrorDocument 404 /error.php
</VirtualHost>
相关文章推荐
- Apache使用 .htaccess 来实现强制https访问的方法
- Apache使用 .htaccess 来实现强制https访问
- Apache用.htaccess来实现强制https访问
- 使用https访问apache服务
- nginx强制使用https访问(http跳转到https)
- nginx强制使用https访问(http跳转到https)
- nginx强制使用https访问(http跳转到https)
- 使用apache的httpcomponents中的httpclient 4.5对https进行访问
- Nginx搭建HTTPS服务器和强制使用HTTPS访问的方法
- nginx强制使用https访问(http跳转到https)
- 强制使用https访问
- nginx强制使用https访问(http跳转到https)
- apache强制使用https
- nginx强制使用https访问(http跳转到https
- centos7安装tengine强制使用HTTPS访问
- Apache http强制转为https页面访问(转)
- 搭建Apache服务器并使用自签证书实现https访问
- nginx强制使用https访问 http跳转到https
- Nginx搭建HTTPS服务器和强制使用HTTPS访问的方法
- nginx强制使用https访问(http跳转到https)