How can I set physical path in commandbox using cfconfig directory mapping

347 Views Asked by At

I am now having an issue in my mac os when I want to create new mapping in commandbox. Let say my physical document root in /Users/Worawit/Projects/tnosystems so, the command line would be cfconfig cfmapping save virtual=/v5ph_uyonming physical=/Users/Worawit/Projects/tnosystems. However, after I set it and run again, seems like it does not locate as what I have set when I try to run through http://127.0.0.1:51969/v5ph_uyonming/

Thanks in advance for anyone who could help me to solve the issue.

1

There are 1 best solutions below

0
On

I believe you are confusing web server mappings (also called aliases in Apache or virtual directories in IIS) with CF mappings. Web server mappings control what you can hit in the URL and CF mappings control how your CFML code resolves local files and directories. If you want to create a web server mapping, follow these docs to modify your server.json

https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/aliases

The command you were running will create a CF mapping that shows up in your CF administrator for the server on the "mappings" page.