使用阿里云的服务器部署网站是http://xiaodongshow.top,现在有需求将其转换为https://xiaodongshow.top,主要是为了微信小程序的连接测试工作.
在使用阿里云的证书进行相关配置之后,打开https://xiaodongshow.top显示的是”It Works” 界面:

解决办法:
将https下的路径与http下的路径一致.就需要修改apache中的配置文件:
我的修改的文件夹路径是 /usr/local/apache2/conf/extra/httpd-ssl.conf 其中,usr/local/apache2是我apache的安装路径,在其安装路径下.有conf/extra/http-ssl.conf文件,修改其<VirtualHost _default_:443>中的配置 ,
修改DocumentRoot"/usr/local/apache2/htdocs" 为 DocumentRoot /yjdata/www/www/showtop //此地址为你服务器默认网页地址

同时,修改usr/local/apache2/conf/httpd.conf文件的相关位置:
修改为 DocumentRoot"/yjdata/www/www/showtop" <Directory"/yjdata/www/www"> 也就是服务器默认网页地址,跟上文中相同.

然后重启一下服务,再次访问域名,就能访问了!
如果有同样的问题,访问还是不可以的可以在下方留言哦!
网友评论