I installed Lucee 5.3.189 with Boncode and Modcfml .on a new Windows 2016 Server.
By default, if I have Virtual Directories defined in IIS, should I be able to pull up those Virtual Directories on Port 80.
If not, what specifically do I have to do to make this happen?
You need to map them in the Lucee administrator
Where specifically is that done.
you only need to map those directories in Lucee if they are going to serve cfm/cfc templates/files. Static files like .js, .css, images are not going to be directed to Lucee Tomcat, because IIS serves them immediatley.
Just like Zac said, you make these configuration in the Lucee administrator, specifically in the section “Archives and Ressources - Mappings”.
Alternatively you can add them also in your Application.cfc with this.mapping.
Additional information can be found here
I have another server that models what I want to see in the contexts.
On this server, I don’t have any mappings or additional hosts added to the tomcat config file.
All my contexts are port 80 and I can run everything from c:\inetpub\wwwroot.
I usually just stumble on the solution without knowing what made it work.
Is there a simple procedure?
The mapping solution you gave doesn’t produce generate the contexts like in the image.
I can’t follow what you are trying to explain. I’m confused.
There is a difference between:
- web contexts and
- virtual mappings
web-context: is the directory (usually named web-inf) that holds all classes and data for your web application to run. These are generated by tomcat after inspecting all your web files.
On the other hand virtual mappings is to set a directory located somewhere in your file system (e.g. d:\some-directory\other-directory) to be be mapped as a directory with a name of your choice (e.g. “files” to be served as it would be a directory in your application (e.g. http:\mydomain\files)
The image you’ve shown above is a listing of your web contexts. One is for Tomcats default ROOT application located in “webapps”, the other for your domains “pd-web” ROOT web application created with the help of mod_cfml (the information mod_cfml grabs from IIS). That looks all correct.
The virtual mappings need to be configured in the admin “Archives and Ressources - Mappings”.
Why should a virtual mapping create a different web context?
After many hours, here was the simple solution.
Gave Everyone full privilege to c:\inetput\wwwroot .
Opened a webpage of one of my virtual directory so Lucee would be able to create a web-inf folder in c:\inetput\wwwroot.
Then removed Everyone privilege to c:\inetput\wwwroot.
@dmarinello What you’ve mentioned is about allowing Tomcat to create the needed web-inf contexts folders. Because Tomcat on Windows runs with the low privileged user local service, it won’t have writting permissions for the IIS wwwroot.
As far as I understand, it is better to give the web-inf folder write permissions for “local service”, otherwise Tomcat won’t be able to update the web-inf folders and also, some of the Lucee functionallity where it needs to write to those directories (e.g. cfchart or
<cfimage type="captcha" ...>) may have uncertain side effects.
Thank you so much for the specific information. I will make that change and document for future installations.
You might also look here or the known defined virtual directories in HTTP headers. At one point we had discussed to automatically map those when present but I have not tested this in a while.