PDA

View Full Version : Installing CFWheels



davidd
February 3rd, 2010, 09:25 AM
Here are some steps for installing CFWheels on ColdFusion 8 and 9:

1. Download the latest version from http://cfwheels.org/download

2. Unzip the contents to a folder on your computer

3. Remove the "web.config" and "IsapiRewrite4.ini" files.

4. Edit the ".htaccess" with any plain text editor(I.E. notepad, wordpad, etc.) and replace the contents with the following:


RewriteEngine On

RewriteCond %{REQUEST_URI} !^.*/(flex2gateway|jrunscripts|cfide|cfformgateway|rail o-context|files|images|javascripts|miscellaneous|sty lesheets|robots.txt|sitemap.xml|rewrite.cfm)($|/.*$) [NC]
RewriteRule ^(.*)$ /rewrite.cfm/$1 [L]

5. Setup a MySQL database and create a ColdFusion DSN for the database. Below are some tutorials on how to do this through the Helm control panel:

Helm3:

How to create a MySQL Database (http://hostek.com/tutorials/helm3_mysql.html)

How to create a ColdFusion DSN (http://hostek.com/httutorials/ColdFusion_DSN_Helm3.html)


Helm4:

How to create a MySQL Database (http://hostek.com/tutorials/helm4_mysql.html)

How to create a ColdFusion DSN (http://hostek.com/httutorials/Helm4_ColdFusion_Datasource.html)


6. Edit the "config/settings.cfm" file in a plain text editor and enter your datasource name and your database username and password. Also, remove the comments around that section:

Example:

<cfset set(dataSourceName="MyDSNName")>
<cfset set(dataSourceUserName="MyDatabaseUsername")>
<cfset set(dataSourcePassword="MyDatabasePassword")>

7. Upload the files to your site(they must be inside the /wwwroot folder for URL rewriting to work properly).

Browse to your site, and you should see the default CFWheels home page.


David D.

brianward
May 12th, 2010, 11:27 AM
You'll want to also add the path "CFFileServlet" to the .htaccess file if you want to use the "CFFILE" tag or any other ColdFusion tag that generates a file.

JonC
January 23rd, 2012, 09:56 AM
Regarding CFWheels installation on Cpanel Linux with Railo:

Installing wheels in a sub-directory does not work by default, we recommend installing only in the root directory and if for development / testing then using a sub-domain so that you can install CFWheels in the root directory while still being able to test outside of the primary domain.

lecnt
August 2nd, 2012, 10:26 AM
Aren't steps 3 and 4 specific to Linux hosting? Don't Windows hosting users need to use web.config? Or does URL rewrite not work in Windows?

I tried to modify my web.config by adding favicon.ico to the exception list but I still get file not found when I try to access it. Here's my web.config file:



<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ColdFusion on Wheels URL Rewriting" enabled="true">
<match url="^(.*)$" ignoreCase="true" />
<conditions logicalGrouping="MatchAll">
<add input="{SCRIPT_NAME}" negate="true" pattern="^/(favicon\.ico|CFFileServlet|flex2gateway|jrunscrip ts|cfide|cfformgateway|railo-context|files|images|javascripts|miscellaneous|sty lesheets|robots.txt|sitemap.xml|rewrite.cfm)($|/.*$)" />
</conditions>
<action type="Rewrite" url="/rewrite.cfm/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

chrisd
August 2nd, 2012, 12:23 PM
lecnt,

We have Isapi_ReWrite v3 installed on this server which would need the rewrite rules placed within the .htaccess file in the wwwroot directory of the domain.

lecnt
August 2nd, 2012, 01:40 PM
Wow, I didn't know there's a way to use .htaccess with IIS. I'm new to Windows hosting, always had Linux before. Thank you so much for the clarification. And, of course, it worked as soon as I updated the .htaccess file.


lecnt,

We have Isapi_ReWrite v3 installed on this server which would need the rewrite rules placed within the .htaccess file in the wwwroot directory of the domain.