没配置ssl时网站访问全部正常,按照http://www.fecshop.com/topic/1249 这个帖子方式配置完ssl,网站一直打不开http、https都无法打开。求各位大大说下到底因为啥。还有手机不自动跳转。配置也都是正常的什么鬼- -
在store.php中配置https
@Fecshop #1楼 好滴 谢谢
@Fecshop #1楼 我在appserver 和 vue 配置了https,访问不了。 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://w' is therefore not allowed access. The response had HTTP status code 404. zepto.min.js:2 Cross-Origin Read Blocking (CORB) blocked cross-origin response https://w with MIME type text/html.
@wubuyun #3楼 配置http是否可以打开,如果http可以打开,https不可以打开 ,这是cros 跨域 https的配置问题
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin#Examples
Access-Control-Allow-Origin: *
appserver的cros在文件:
https://github.com/fecshop/yii2_fecshop/blob/master/app/appserver/modules/AppserverController.php
appserver的cros 还是不行,我在apache开启了module headers,可以了。
a2enmod headers
service apache2 restart
add the following line inside either the , , or sections of your server config (usually located in a *.conf file, such as httpd.conf or apache.conf
Header set Access-Control-Allow-Origin "*"
Header always set Access-Control-Max-Age "86400"
Header always set Access-Control-Allow-Headers "X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding"
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
@wubuyun #6楼 您搜索下资料尝试自己解决下吧,这个应该是cros的问题。
:ok_hand: