扫码关注官方订阅号
如何让我的一个域名支持Http & Https 协议,都是用同一个目录?
Http
Https
光阴似箭催人老,日月如移越少年。
<VirtualHost *:443> ServerName example.com DocumentRoot /var/www/html ... SSL相关部分 ... </VirtualHost> <VirtualHost *:80> ServerName example.com DocumentRoot /var/www/html ... 其他apache配置 ... </VirtualHost>
是不是这样。我也没试过,看了下我在用的配置。
ServerName example.com:443 DocumentRoot /var/www/html ... SSL相关部分 ... ServerName example.com:80 DocumentRoot /var/www/html ... 其他apache配置 ...
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
是不是这样。我也没试过,看了下我在用的配置。
ServerName example.com:443
DocumentRoot /var/www/html
...
SSL相关部分
...
ServerName example.com:80
DocumentRoot /var/www/html
...
其他apache配置
...