php - How to make ".well-known/pki-validation/fileauth.txt" publicly accessible in cakePHP 2x?
问题描述
I have the CakePHP 2x framework installed on my www.abc.com apache server. I issued an SSL certificate successfully and suggested to place the auth file on ".well-known/pki-validation/" location, that is done already. they suggest like ".well-known/pki-validation/fileauth.txt" should be publicly accessible.
when i am trying to access "www.abc.com/.well-known/pki-validation/fileauth.txt" i am getting following error
Fatal error: Call to a member function link() on null in /home/fmfcom/public_html/app/views/layouts/default.ctp on line 18
How do we make it done?
Thanks
解决方案
CakePHP 2 默认的公共文件夹是:
/app/webroot
您可以检查您的服务器发布文件夹是否正确设置为上述,如果没有,您将面临这种静态文件问题,您的服务器可能必须指向类似/public_html/app/webroot
服务器是否基于 Ubuntu检查是否启用了 Apache mod_rewrite,以sudo a2enmod rewrite
在控制台中启用类型,在所有更改后重新启动 Apache。
推荐阅读
- asp.net - 如何自动开启 IIS
- c# - 当 URL 包含缩略图时,应排除 Blob 触发器绑定
- python - 证书验证失败的谷歌 API
- cordova - (节点:8828)UnhandledPromiseRejectionWarning:CordovaError:JDK 1.8 或更高版本的要求检查失败
- amazon-web-services - AWS S3 - 配置网站访问
- racket - 在球拍中编写词法分析器 - 包含指令有问题
- amazon-web-services - 使用分区键和特定排序键列表查询 DynamoDB
- facebook-graph-api - Facebook Graph API:检索给定用户评论的页面中的评论
- java - RuntimeException 类型不匹配。使用 phoenix JDBC 为空的布尔值
- php - 为什么我的 register_shutdown_function() 不能使用命名空间?