• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Why static file in wwwroot can not be access in url?

New Here ,
Mar 15, 2023 Mar 15, 2023

Copy link to clipboard

Copied

I installed successful ColdFusion 2021 developer in Ubuntu 20, I can access admin panel with http://127.0.0.1:8500/CFIDE/administrator/index.cfm but when I try create a file in wwwroot is index.cfm and then I hit http://127.0.0.1:8500/index.cfm, it says

File not found: /index.cfm

How do I fix it? And may I create routing or do something like this.

Views

598

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 16, 2023 Mar 16, 2023

Copy link to clipboard

Copied

Do the following test:

  1.  Verify that the file index.cfm has been saved in the same (wwwroot) directory as CFIDE. Within the same wwwroot directory, save the following code as the file testpage.cfm
    The current directory is: <cfoutput>#getDirectoryFromPath(getCurrentTemplatePath())#</cfoutput>
  2.  Launch the following in a browser:
    http://127.0.0.1:8500/index.cfm
    http://127.0.0.1:8500/testpage.cfm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 16, 2023 Mar 16, 2023

Copy link to clipboard

Copied

This is just a guess, but it seems possible that the permissions on your index.cfm might not allow it to be read by Tomcat (and therefore CF). Look at what you have in /CFIDE/administrator/ and see what user and group permissions are on the file, then apply those same permissions via sudo to the index.cfm file. Use chmod and chown to do this. If that's the problem, you can make everything in the directory conform to those permissions by using that account to write files to the directory, or by running chmod and chown after you make any changes.

 

Dave Watts, Eidolon LLC

Dave Watts, Eidolon LLC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 16, 2023 Mar 16, 2023

Copy link to clipboard

Copied

I dont think so because the error say file not found not file permission
403.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 16, 2023 Mar 16, 2023

Copy link to clipboard

Copied

Maybe, maybe not. I'd still look at the permissions. It's easy to do.

 

Dave Watts, Eidolon LLC

Dave Watts, Eidolon LLC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

As you said, I changed the permission like this:
sudo chmod -R 777 touch/
sudo chown -R $USER:bin touch/
But I can't still access. How do I fix it?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

Have you done the test I suggested? 

If so, what were the results.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

By the way, your title says index.cfm is a static file. It is not. Were you perhaps confusing it with http://127.0.0.1:8500/index.html?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

it's ok with index.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

quote

it's ok with index.html


By @Nam28890948vceg

Your answer is crytic. I don't understand what you mean by "ok with index.html".

 

Is your question about http://127.0.0.1:8500/index.cfm or is about http://127.0.0.1:8500/index.html?

 

An unanswered question, once again:

"Have you done the test I suggested? If so, what were the results?"

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

Sorry, i mean i can access index.html file. I searched this case on
internet before.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

quote
Sorry, i mean i can access index.html file. I searched this case oninternet before.
By @Nam28890948vceg

An unanswered question, once again:

"Have you done the test I suggested? If so, what were the results?"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

I did and I successful access my static file

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

quote
I did and I successful access my static file
By @Nam28890948vceg

Do you mean successful access to index.html? That is the static file.

 

What were the results of:

http://127.0.0.1:8500/index.cfm
http://127.0.0.1:8500/testpage.cfm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

LATEST
Booth index.html and index.cfm can be access. Index.html can be access mean
i installed ColdFusion success, does not require any config, just create
html file. But with cfm must create virtual host in iis or apache and
connect to ColdFusion to process cfm file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

Sorry to all, I forgot to say I'm using Apache2 to connect with so as @Dave Watts said I change virtual host with:

And I can access in url

<Directory "/home/may/Downloads/ColdFusion_2021_WWEJ_linux64/ColdFusion2021/ColdFusion/cfusion/wwwroot/touch">
	Order allow,deny
	Allow from all
	Require all granted
    </Directory>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation