首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ColdFusion CommandBox -禁用消息

ColdFusion CommandBox -禁用消息
EN

Stack Overflow用户
提问于 2021-02-12 04:47:01
回答 2查看 103关注 0票数 3

我有一个与CommandBox设置相关的问题。我使用的是最新版本的ColdFusion,我的文件夹结构如下所示:

D:/CommandBox/wwwroot

我在wwwroot文件夹中创建了index.cfm文件。该文件只包含一行代码:

<cfoutput>#now()#</cfoutput>

一旦我在我的浏览器中运行它,这就是我使用的url:

http://127.0.0.1:8080/

结果输出是我在浏览器中看到的错误消息:

Forbidden

如果我使用这个url代码将产生正确的输出:

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

代码语言:javascript
复制
<!-- 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>

正如你看到的每条评论以上的代码,这应该是默认的登录页面。如果有人知道这个问题的原因和解决方案,请让我知道。谢谢。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2021-02-13 07:24:36

我为上面的问题找到的解决方案是下一步。

代码语言:javascript
复制
 1. First step in this process is to create index.cfm file inside your
    root folder (CommandBox/wwwroot)
    
 2. Stop the CommandBox
    
 3. Start CommandBox again
    
 4. Entered this url in your browser: 127.0.0.1:8080 (you can replace 8080 with your port number)
票数 4
EN

Stack Overflow用户

发布于 2021-11-23 12:04:01

根文件夹中必须有index.htmlindex.cfm文件,请确保没有丢失这两个文件。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66162575

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档