These are the steps I use:
1) I created new mapping inside CF Server => Server Settings => Mapping
logical path: /mysite
directory path: /Volumes/drive2/work/mysite
2) I restarted the server
/Applications/ColdFusion2018/cfusion/bin/coldfusion stop && /Applications/ColdFusion2018/cfusion/bin/coldfusion start
3) Using my preferred text editor, I created test.cfm inside /Volumes/drive2/work/mysite with the following contents
4) I then tried viewing the new file on my browser via
I then get a 404 error. Exact message goes like "coldfusion.runtime.TemplateNotFoundException: File not found: /mysite/test.cfm"
I checked these 2 things:
Other than creating the mapping, the other configurations I've changed are:
Any ideas what I could be doing wrong? or perhaps other settings I should've set? I've added a screenshot of the mappings section below.
I can only think of two things.
First, make sure the connector is properly set. Sometimes it will look successful, but logs can indicate otherwise.
Next, look at this SO thread currently with only one answer. It might help.
^ _ ^
CF mappings aren't going to let you resolve file paths through the web server, which is what you're trying to do here. They only affect CFML tags that use their own file paths, like CFINCLUDE and CFMODULE. You'll need to create a virtual mapping in your web server. Since you're using the CF built-in web server, you'll need to edit a text file for configuration as described here:
I found that, along with some other useful information, from Charlie Arehart's blog post here:
Dave Watts, Eidolon LLC