ColdFusion CommandBox - Forbidden message

260 views Asked by At

I have a question related to CommandBox setup. I use latest version of ColdFusion and my folder structure looks like this:

D:/CommandBox/wwwroot

Inside of the wwwroot folder I created index.cfm file. That file contains only one line of code:

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

Once I run this in my browser this is the url I use:

http://127.0.0.1:8080/

The result output is the error message that I see in the browser:

Forbidden

If I use this url code will produce the correct output:

http://127.0.0.1:8080/index.cfm

I would like to know why index.cfm has to be included in url? Is there a way to set index.cfm to be default landing page? Also, I found in my root folder C:\Users\myusername\.CommandBox\server\D9F80673BC7799BE959B513656FE8F55-CommandBox\lucee-5.3.6.61\WEB-INF file web.xml that contains this code:

<!-- 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>

As you can see per comment above the code this should be default landing page. If anyone knows the reason and solution for this issue please let me know. Thanks.

2

There are 2 answers

0
espresso_coffee On BEST ANSWER

The solution that I found for the issue above was next.

 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)
0
simo On

There has to be index.html or index.cfm file in root folder, make sure you are not missing both.