如何解决ColdFusion CommandBox - 禁止消息
我有一个与 CommandBox 设置相关的问题。我使用最新版本的 ColdFusion,我的文件夹结构如下所示:
D:/CommandBox/wwwroot
在 wwwroot
文件夹内我创建了 index.cfm
文件。该文件仅包含一行代码:
<cfoutput>#Now()#</cfoutput>
在我的浏览器中运行后,这是我使用的网址:
http://127.0.0.1:8080/
Forbidden
http://127.0.0.1:8080/index.cfm
我想知道为什么 index.cfm
必须包含在 url 中?有没有办法将 index.cfm
设置为默认登录页面?此外,我在包含此代码的根文件夹 C:\Users\myusername\.CommandBox\server\D9F80673BC7799BE959B513656FE8F55-CommandBox\lucee-5.3.6.61\WEB-INF
文件 web.xml
中找到:
<!-- default file to execute if directory is called with no file name,e.g. http://yourip.com/ !-->
<welcome-file-list>
<welcome-file>index.cfm</welcome-file>
<welcome-file>index.lucee</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
正如您在代码上方的每条评论所见,这应该是默认登录页面。如果有人知道此问题的原因和解决方案,请告诉我。谢谢。
解决方法
我为上述问题找到的解决方案是下一个。
asciidoctor
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。