May 8, 2024
Changing the Default Webroot in ColdFusion
Comments
(0)
May 8, 2024
Changing the Default Webroot in ColdFusion
Staff 14 posts
Followers: 3 people
(0)

The ColdFusion comes with the default Webroot(\<cf_home>\cfusion\wwwroot); however, there are situations where you may need to customize this Webroot directory and point it to a different folder. This blog will walk you through configuring a custom Webroot directory in ColdFusion.

Step 1: Take a backup of the existing server.xml file in the (\<cf_home>\cfusion\runtime\conf) directory. This ensures that you can revert to the original configuration if needed.

Step 2: Open the server.xml file in a text editor and navigate to the <Host>  tag. Just above the closing </Host> tag, add the following <Context> tag:

                <Context path=”” docBase=”C:\wwwroot”                    

                            WorkDir=”C:\ColdFusion2023\cfusion\runtime\conf\Catalina\localhost\tmp”>

                      </Context>

                 </Host>

Replace C:\wwwroot with the path to your custom Webroot directory.

Step 3: Copy the WEB-INF, CFIDE, and cf_scripts folders from the

(\<cf_home>\cfusion\wwwroot) directory to your custom Webroot directory (C:\wwwroot).

Step 4: Navigate to the Java and JVM in the ColdFusion administrator page, change the ColdFusion Class Path for jars to custom Webroot directory(C:/wwwroot/WEB-INF/cfform/jars).

Step 5: Restart the ColdFusion Application service. Now, you can place the code in the custom Webroot directory (C:\wwwroot) and run it.

Note: Whenever you install or uninstall the ColdFusion update, you will need to copy the WEB-INF, CFIDE, and cf_scripts folders from the (\<cf_home>\cfusion\wwwroot) directory to your custom Webroot directory (C:\wwwroot).

 

0 Comments
Add Comment