Highlighted

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

Community Beginner ,
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

754

Likes

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

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

Community Beginner ,
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

755

Likes

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

Likes

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
Reply
Loading...
Oct 03, 2014 0
Community Beginner ,
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

Likes

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
Reply
Loading...
Oct 06, 2014 0
Adobe Employee ,
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

Likes

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
Reply
Loading...
Oct 06, 2014 0
Community Beginner ,
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

Likes

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
Reply
Loading...
Oct 06, 2014 0
Adobe Employee ,
Oct 06, 2014

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Oct 06, 2014 0