我是用 docker 跑 drupal,建站安装时出现这个错误: The provided host name is not valid for this server 该怎么排查,谢谢大家指点, 预祝大家春节快乐
1
saeed 2020-01-18 14:20:41 +08:00
$settings['trusted_host_patterns'] = array(
'^172\.20.\0.\3$', '^localhost$', ); |
2
programV2 OP @saeed 谢谢 V 友, 请问我不是在本地安装, 是在 VPS 上, 这个 trusted_host_patterns 是写服务器 IP 还是绑定的域名?
|
3
programV2 OP @saeed 我在 dns 记录里把 www.example.com 做的 cname 指向 example.com, 这里只要写一条记录就可以了吗? 再次谢谢
$settings['trusted_host_patterns'] = array( '^example\.com$', ); |
4
programV2 OP @saeed 我修改完 后重新启动容器, 浏览器输入域名出现
An error occurred. Sorry, the page you are looking for is currently unavailable. Please try again later. If you are the system administrator of this resource then you should check the error log for details. Faithfully yours, nginx. |