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

CF11 Install on Mac OSX (Sierra)

Community Beginner ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

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

Views

1.1K

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

correct answers 1 Correct answer

Community Expert , Mar 21, 2018 Mar 21, 2018

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 I

...

Votes

Translate

Translate
Community Expert ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

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

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 ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

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.

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 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

I don't think CF "expects" any specific configuration. It's just going to append the parts that it needs, and the rest is on you. I don't really think that's Adobe's fault either - it's just the way Apache works. What normally takes five minutes on Windows is because IIS uses XML files for configuration. Apache doesn't. But all you should really know is where the web root is, and put your files there.

All that said, my recommendation is if you're just using CF on OS X for development, don't even bother hooking it up to Apache in the first place unless you're specifically using some piece of Apache functionality (mod_rewrite, etc) and you want to test that too.

Dave Watts, Fig Leaf Software

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 ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

thanks Dave for the insight. I agree it's not Adobe's fault. I'll give the internal server in CF11 a try before I cry any more noob tears.

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 ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

using the internal server on CF11/MacOSX works a little easier. thanks Dave.

on configuring "mappings" within the CF administrator - a couple questions:

I'm able to access:

127.0.0.1:8500/CFIDE/administrator

and

127.0.0.1:8500/test.cfm

(test file output of)

{ts '2018-03-21 14:47:56'}

/Applications/ColdFusion11/cfusion/wwwroot/test.cfm

****

When trying to add mappings within CF Admin of:

logical path: 

/test_dir

directory path:

/Applications/ColdFusion11/wwwroot/test_dir

1. do I have to restart CF for mappings to take effect?

2. what is required to allow CF to use a different directory different than /Applications/ColdFusion11/cfusion/wwwroot/

(I've never deployed ANY CF application from the cfusion directory. why would I start now?)

For as much trash as people talk about windows, setting CF up in a windows environment is a fraction of the headache it is on a Mac. Why?

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 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

If you're using the built-in CF web server, you don't necessarily have to create mappings for each folder you put into your CF web root directory. Instead, you can create a single mapping for the web root directory itself, consisting of "/". You don't have to restart CF for mappings to take effect.

There's an XML configuration file for the built-in CF web server (which is actually the built-in Tomcat web server, I suppose), and you might be able to change the web root there. I've never tried, though. There might be a problem in that the web root also contains a "magic" directory called WEB-INF, and I don't know what happens if you move the web root without moving that too, etc.

Remember, mappings only affect CF tags like CFINCLUDE, CFMODULE etc looking for files using paths beginning with a slash. They don't have any effect on the built-in web server itself. They're not like web server virtual mappings. You can configure web server virtual mappings using the XML configuration file mentioned above.

I don't know that people talk that much trash about Windows any more, and I see people split about half and half. But if you're just using the local copy of CF to do development, there isn't much difference between the two as long as you don't use Apache or IIS. And, frankly, IIS has its share of quirks etc that can be really painful in production, so I'd rather use Apache if I can. I use Windows for development, though.

Dave Watts, Fig Leaf Software

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 ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

I suppose I'm just not used to running CF locally. Certainly not on a Mac.

A little puzzled on why/how the documentation is so poor on such basic requirements.

ie

How to configure CF11 to run using Apache on a Mac?

How to tell CF that it's root directory should be something OTHER than /Applications/ColdFusion11/cfusion/wwwroot/

What settings are required to have CF11 use Apache per the installation "instructions"?

On a *Nix box ... is it even POSSIBLE to have your CFM/CFC files not stored within the default /Applications/ColdFusion11/cfusion/wwwroot directory?
(I've never EVER used that directory, with the exception of getting to the CF ADMIN)

Where does the configuration happen?
Not IIS, not Apache. Where?

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 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

Honestly, it's been so long since I've installed CF on OS X that I'm not sure of the exact steps, but during the install you can choose whether or not to configure an external web server. And if you choose to do that, that's pretty much it - there aren't any further choices with Apache. If you do that, your web root will be wherever Apache says it is (on OS X or Linux).

Most people who are using the built-in web server for development purposes don't care where the web root is. You could make a symlink to somewhere else I guess. If you're using the built-in web server, the configuration for that is an XML file in the CF directory somewhere. I'm not in front of a machine running CF so all I can do is point to the documentation:

ColdFusion Help | Connect to web servers

Dave Watts, Fig Leaf Software

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 ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

thanks for the response. unfortunately ... I'm not finding any of that to be the actual case:

still puzzled on how there isn't a singl;e f***ing document that has complete accurate confiuguration information.

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 ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

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?

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 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

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

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 ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

I'm marking all your answers helpful, because they all have little bits of information that might help my understanding.

I still maintain Adobe fails miserably at having documentation worth a damn on certain topics.

Thank you for your answers and patience.

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 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

I wish you the best of luck getting everything set up! But I think that you really can't lay the blame at one specific vendor or another. I've been working with web servers and application servers for years, and I end up having to look things up in multiple places all the time. Adobe (or Apple or Microsoft) simply can't provide all the answers themselves. Adobe doesn't really cover the details of web server configuration very much, because they (rightly or wrongly) assume you'll need to know how to configure a web server if you want to use it, even without CF. Documentation on things in the Unix world is often very ... sparse. Apple includes Unix running "under the covers" but it's not really what they're selling, so they don't provide much documentation on that. On the bright side, learning all this stuff is valuable and will help you troubleshoot other problems in the future.

Dave Watts, Fig Leaf Software

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 22, 2018 Mar 22, 2018

Copy link to clipboard

Copied

CF_CayuseDev, I know I'm walking on some thin ice given how you've responded here, but in case it may be helpful I wanted to step in. First, I offer a hearty +1 to ALL that Dave had said.

But as for your concern that there's nothing documenting how to do what you want, did you read what Dave pointed to? It was the chapter within the manual, "Configuring and Administering ColdFusion". And in those 20 pages of that one chapter whose link he shared, there are multiple subsections dealing with Apache configuration and CF. There's a section on using the web server configuration tool (UI), and its available command line equivalent, and it also discussed the apache conf file directives specifically, then again later in the discussion of multiple vhosts (which is under a section on multihoming).

Or might your concern be more that you looked for OS X or Mac instead, and finding nothing you presumed there was nothing of interest for you there? Well, note that there's no discussion of Linux, either. Instead, the Apache discussion is mostly generic to that web server whether run on Windows, Linux, MacOS, or Unix.

(As an aside, there are some references to "Unix", but one can tell from the context that these are just how the original writers of the docs--some years ago--wrote them under the presumption that "Unix" covered all variants, including Linux and OS X.)

If instead, your beef is that you DID read that doc, and the 60+ references to Apache and somehow still felt that it failed you, well, then I would echo what Dave said, that they are a bit hamstrung in trying to cover everything on the topic, soup to nuts. I mean, consider just how the details would vary for each of the different *nix OS's for Apache alone. This chapter could become 60 pages, and then would require constant updating as the OS's evolved.

But let me say finally that if you do have some specific idea of what would seem to you a reasonable improvement that could be made, the Adobe folks are in fact open to improving the docs. I have seen discussion AND implementation of changes to easily several dozen pages of content across the several CF docs during just the past year alone.

Yep, you can tell I'm more a fan of the CF docs than not. (And as for the "several CF docs", I'll share here a recent post of mine to the CF Community Portal: Did you know there’s far more to the CF docs than just the CFML Reference? , if that may help other readers of this thread.)

I always want to help people use them better--as well as see them get better. And this even though I was a contributor, like Dave, to many if not most of the CF books offered in the past 20 years. The economy doesn't support more of those, but with the CF docs totaling a few thousand pages over several manuals, we all need to leverage them, and indeed press for improvement where needed.


/Charlie (troubleshooter, carehart.org)

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 ,
Mar 22, 2018 Mar 22, 2018

Copy link to clipboard

Copied

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.

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 23, 2018 Mar 23, 2018

Copy link to clipboard

Copied

LATEST

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)

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 ,
Mar 22, 2018 Mar 22, 2018

Copy link to clipboard

Copied

This was the final piece of the puzzle that filled in the void in my understanding. Obviously, me slamming Adobe for not having adequate documentation on how to configure Apache on a Mac is extremely misguided.  Most of my problem was being able to locate, and then understand the documentation I did find.

After mapping URL to a filesystem location in my httpd.conf file, I was able to use Apache to serve up a CFM file.

However ... it wasn't passing the CFM to the CFML engine.

I then ran the web connector for apache, and then there was great joy.

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