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

Newly installed coldfusion 11 configured with apache cannot read css/js/jpg files

Community Beginner ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

I am sure I am missing something really easy, but I cannot get my css stylesheet to work on my fresh installation. 

  • coldfusion 11 with apache 2.2
  • my cfm files can be parsed in subfolders, but a css file (or anything else other than cfm files) in the same folder doesn't seem to be working as hoped
  • if I type in something like "localhost/appName/css/main.css" I get a 404 File Not Found error

Does this error indicate an apache or coldfusion problem?

Thanks in advance for any help, Wayne

Views

931

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
Explorer ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

Hi Wayne,

Could you please confirm if the webroot you are referring to is the ColdFusion webroot, or Apache webroot.

CSS files in the ColdFusion webroot may not be served when explicitly requested through the Apache port, since Apache would not even forward the request to ColdFusion.

Of course, when a CFM page is requested, stylesheet's referenced within CFM pages must get loaded!

- Immanuel

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 Beginner ,
Oct 06, 2014 Oct 06, 2014

Copy link to clipboard

Copied

Dear Immanuel

The webroot is the ColdFusion webroot, not Apache.

I am guessing then that I have to edit httpd.conf to get my cfm files to work as I hope?

  Wayne

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
Adobe Employee ,
Oct 06, 2014 Oct 06, 2014

Copy link to clipboard

Copied

Wayne,

You have to change the webroot directoty from httpd.conf file and that will take care of the issue, if your files(cfm/jpg/css) are in ColdFusion webroot folder then make the change and restart Apache.

Thanks,

Priyank

Thanks,
Priyank Shrivastava

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 Beginner ,
Oct 06, 2014 Oct 06, 2014

Copy link to clipboard

Copied

Dear Priyank

I went into httpd.conf and changed the document root from "c:/wamp/www/" to "c:/ColdFusion11/cfusion/wwwroot/", then restarted the server.

Then when I browsed my application I received a "403 Forbidden" error?

  Wayne

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
Adobe Employee ,
Oct 06, 2014 Oct 06, 2014

Copy link to clipboard

Copied

LATEST

You have to make another change in httpd.conf. There an entry for

<Directory "<apache webroot>"  > change it to <Directory "C:\ColdFusion11\cfusion\wwwroot">

Restart and it will work.

Thanks,

Priyank

Thanks,
Priyank Shrivastava

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