nginx配置
发布于 5 年前 作者 jie92 6925 次浏览 来自 官方Issues

有nginx大神吗 我配置完之后页面必须带动态参数 不带动态参数http还好 https的话刷新要么404 要么就Welcome to nginx!了 这样微信功能的开发进度会变得很慢

2 回复
server {
            listen 80;
            server_name  xxx.com;
            rewrite ^(.*)$   https://$host$1 permanent;//强制https
}

把conf文件贴出来更便于查错。如果http是对的而https是错的,那么检查一下port=443的server中,有哪些配置项是与port=80的server中不一样。

回到顶部