user5916784
user5916784

Reputation:

using a single folder for 2 times on same drive

I have two websites pointing to two different folders on the same drive under the inetpub/wwwroot binded to the coldfusion server which is configured with IIS . The directories which one is called

abc and other is called xyz

i want to use a site wide error handler for both the sites which i have specified as errors/mypage.cfm

now errors is a complete different folder which runs on the cferror exception which i had defined it in the Application.cfm of the abc folder

i want the errors folder file should run on both the sites and it should the errors for both the sites

what should be my trick here, am using coldfusion 11

Upvotes: 0

Views: 70

Answers (1)

WilGeno
WilGeno

Reputation: 185

Create a separate location in your IIS webroot for the site wide error handler. Then create an IIS alias for each site that points to that location. Then in the CFAdmin setup the site wide error handler to point to that location. In the server.xml create a ColdFusion alias.

Example:

  • Your webroot is: c:\inetpub\wwwroot\
  • Error handler location: c:\inetpub\wwwroot\500errors\
  • IIS Alais: 500errors --> c:\inetpub\wwwroot\500errors\
  • CFAdmin setting: /500errors

Add this line to your server.xml in the HOST section and adjust it for your specific paths.

<Context path="/" docBase="C:\ColdFusion11\cfusion\wwwroot" WorkDir="C:\ColdFusion11\cfusion\runtime\conf\Catalina\localhost\tmp" aliases="/500errors=c:\inetpub\wwwroot\500errors\" />

Upvotes: 2

Related Questions