Skip to main content
CF_CayuseDev
Known Participant
March 21, 2018
Answered

CF11 Install on Mac OSX (Sierra)

  • March 21, 2018
  • 1 reply
  • 1980 views

I'm trying to get CF11 installed on my local MacBook running OSX.

After running the installer, and selecting to use an Apache as the external web server - I'm able to get to the CF Administrator.

127.0.0.1/CFIDE/administrator/index.cfm  (OK)

I've confirmed that this is pointing to:

/Applications/ColdFusion11/cfusion/wwwwoot/CFIDE/

Created a test page at

/Applications/ColdFusion11/cfusion/wwwwoot/CFIDE/test.cfm   (works fine)

127.0.0.1/CFIDE/test.cfm (OK)

However .... any other directory EXCEPT for CFIDE either shows no permissions or file not found.

/Applications/ColdFusion11/cfusion/wwwwoot/some_other_directoy/test.cfm

127.0.0.1/some_other_directoy/test.cfm

127.0.0.1/wwwroot/test.cfm

Both show what I'm guessing is the Apache page for a 404.

Not Found

The requested URL /test.cfm was not found on this server.

********

I 've tried:

updating httpd.conf located at: /etc/apache2/httpd.conf with various suggested settings for CF

create "mappings" via the CF admin (they don't work)

------------

How can I tell why any other directory besides

/Applications/ColdFusion11/cfusion/wwwwoot/CFIDE/ won't load in a browser?

I've stopped and started both apache and CF a dozen times, each time with a slightly different httpd.conf - but still no joy.

Any ideas are appreciated.

Thanks

This topic has been closed for replies.
Correct answer Dave Watts

Rather than ask to how to do something that might not be what I want, I'll rephrase the question.

I have CF11 installed on Mac OSX (sierra), configured to use CF's internal "web server".

After installation, I'm able to access:

http://127.0.0.1:8500/CFIDE/administrator/

which is pointing to

/Applications/ColdFusion11/cfusion/wwwroot/ on my local machine

What I'd like is to be able to have it set up such that when I navigate to:

http://127.0.0.1/some_directory/index.cfm

ColdFusion knows that I want to load the page located:

/Users/<user_name>/Documents/some_directory/index.cfm

I know it's possible with CF, as I've done this for years on windows machines without any problem.
Well documented, easy to set up, takes less time than writing this post.

How can I go about that?


First, it's not ColdFusion's job to find what page to run, exactly. The web server tells it that. In your example just now, you have one URL that looks like http://127.0.0.1:8500/ (that's using the built-in web server) and another URL that looks like http://127.0.0.1/some_directory (that's using the external web server). In both cases, it's the web server's job to convert the URL to a file path, and give the resulting file path to CF. In Windows, you'd have to create that web root directory in IIS. In Apache, you'd do that in the httpd.conf file. If you have one virtual server, you'd simply change the DocumentRoot.

Mapping URLs to Filesystem Locations - Apache HTTP Server Version 2.4

If you have more than one, you'd need to create a Virtual Host:

https://httpd.apache.org/docs/2.4/vhosts/examples.html

It's easier to do that in Windows because of the web server configuration, not because of CF. With Apache, you'll have to look at the lines CF added to httpd.conf, see which of those need to be included in your Virtual Host and which need to be in the rest of httpd.conf.

Dave Watts, Fig Leaf Software

1 reply

Community Expert
March 21, 2018

If you configured CF to work with Apache, you'll have to put those other files in the Apache webroot, which will be somewhere else. I'm not sure where it'll be on OS X, but you should be able to look in httpd.conf and figure out where. The reason that /CFIDE works is because it's automatically set up as a virtual directory so you can run CF Administrator.

Dave Watts, Fig Leaf Software

Dave Watts, Eidolon LLC
CF_CayuseDev
Known Participant
March 21, 2018

Is there any documentation on how ColdFusion expects to have the httpd.conf file configured?

What normally takes 5 minutes on a windows box is basically undocumented for a Mac installation.

Thanks Adobe,. you suck.

Charlie Arehart
Community Expert
Community Expert
March 23, 2018

Charlie,

Thanks for your comments. I've read both yours and Dave's contributions to the ColdFusion universe for quite some time.

Both of your contributions have helped me to bridge the gap in either documentation, or simply my understanding.

Specifically on Carehart.org - I've read multiple articles you've written that had crucial information to configuring/working with CF.

I did read all of the links Dave included. Some of them I had read before, but didn't know what applied to my situation.

Some of it I just didn't understand. Again, none of that is Adobe's fault.

I think the first step I need to take - is a step back and avoid blaming this, that, or the other on Adobe.
Secondly, I'd like to recognize that, without contributors like you and Dave - many CF'ers would be in a world of hurt.
I understand that Adobe can't make a step by step guide for every possible configuration, OS, etc.

I don't think it would have been too terribly difficult for them to include a step by step guide on getting CF11 to run on a Mac  - over Apache. Perhaps this is where I can end my fail ... and contribute by documenting exactly what I did to get things going.

I eventually did find all the pieces I need - in different places. MOST if not all of it ... was knowing a small bit about Apache.

I'm going to redo the process just for kicks but -

What eventually worked for me was:

1.install CF for Mac with the installer (download and run it using basic settings and internal server)

2. move my web app directory with my CFM files into /Applications/ColdFusion11/cfusion/wwwroot/

3. Set the document root in Apache:

        open terminal. open the httpd.conf Apache config file with:

       sudo nano /etc/apache2/httpd.conf

       

   A)  replace:

DocumentRoot "/Library/WebServer/Documents"

<Directory "/Library/WebServer/Documents">

with

DocumentRoot "/Applications/ColdFusion11/cfusion/wwwroot"

<Directory "/Applications/ColdFusion11/cfusion/wwwroot">

B) set default document:

replace

DirectoryIndex index.html

with

DirectoryIndex index.html index.cfm

C) Add an Alias

      replace

# Alias /webpath /full/filesystem/path

with

Alias /any_path_you_like /Applications/ColdFusion11/cfusion/wwwroot

4. Run the CF Apache web server configuration script from the Terminal:

  ie

cd /Applications/ColdFusion11/cfusion/runtime/bin/

./wsconfig -ws apache -dir /etc/apache2

****

So ... four steps. Maybe too specific for Adobe to include in any technical documentation.

Maybe not.

Again ...

Thanks for the help. I'm looking forward to getting stuck in the future, so I can have another chance to figure things out without being a complete ninny.


Thanks for the kind regards, and glad to see that you could get to a resolution. And I do appreciate your taking some responsibility for the challenges you faced, but again I agree there are always ways the docs could be improved, so thanks for sharing what you think could have helped.

That said, you show changing the apache config to find your code in the CF wwwroot. I'm curious why you did that. You don't need to.

I know you got a bit confused from the outset, first seeking to understand how to get the built-in web server to point to a folder outside of there ("How to tell CF that it's root directory should be something OTHER than /Applications/ColdFusion11/cfusion/wwwroot/")

And then you were trying to get Apache to find code IN that folder. To be clear (and as Dave tried to explain), the cfusion/wwwroot is where CF sets things up for its OWN built-in web server (what is technically the Tomcat web server). That's used for the CF Admin (since CF2016), but since CF6 it's always been there as an option one COULD use instead of an external web server (like Apache or IIS).

But now that you ARE using Apache, you really don't need to tell IT to find CFML code inside that cfusion/wwwroot. You could have left Apache pointing to whatever folder it was pointing to by default (an htdocs somewhere inside your apache folder), or you could indeed change it to point to any folder you want.

I'm just saying you don't NEED to change it to point you to the CF wwwroot. :-) And once you understand that, I hope you would see how the docs that are there now also presume you would NOT do that, and that's why they don't show doing that. And it's also then hopefully clear that what they DO show SHOULD be sufficient for most people to get going. :-)

But again, if you still feel something could be made more clear (if the other 3 of your 4 steps are not presented in that doc as you think they should be), then again perhaps Adobe will consider your suggestion.

/Charlie (troubleshooter, carehart. org)