Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Coldfusion not working with Apache Virtual Hosts
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
bigreddastud  
View profile  
 More options Jan 10 2005, 4:26 pm
Newsgroups: macromedia.coldfusion.server_administration
From: "bigreddastud" <webforumsu...@macromedia.com>
Date: Mon, 10 Jan 2005 21:26:48 +0000 (UTC)
Local: Mon, Jan 10 2005 4:26 pm
Subject: Coldfusion not working with Apache Virtual Hosts
I've upgraded my server to a new box, and in the process decided to migrate
from IIS to Apache webserver.  Coldfusion works fine without Apache virtual
hosts (ie one webste) but when I setup for multiple sites using virtual hosts,
CF starts acting weird.  The server will intermittently send content from the
wrong document root from the other site!

 Example: calling up www.domain1.com get you domain2.com's homepage

 This is not completely random from what I've found.  Usually whichever domain
I call first is the documents CF tries to server up.  It's like it's caching
the index.cfm files and won't recognize the virtual hosts.   After a while,
I'll call the other domain, and that one seems to in effect become cached
within the CF server.  The problem is DEFINITELY within Coldfusion since
calling regular index.htm files results in 100% accuracy.  Only when I call the
*.cfm pages does it get confused and start sending from the wrong document
roots.

 I dumped my CGI vars and the CF_TEMPLATE_PATH variable seems to get "stuck" in
one docroot.  If I call Domain1.com  (and the first one's sent correctly) but
then immediately thereafter call domain2.com it'll send the wrong page.  Also I
can tell which site's page I'm going to get by looking at the dumped
CF_TEMPLATE_PATH variable even though EVERY other CGI variable points to the
correct virtual host.

 How can I fix this?  Do I have to spawn 2 Jrun servers (one for each
virtualhost)?  Please help ASAP!

 I attached my Apache httpd.conf file for virtual hosts:

 # www.domain1.com host
 <VirtualHost *>
     ServerAdmin webmas...@domain1.com
     ServerAlias *.domain1.com
     DocumentRoot D:\inetpub\wwwroot\domain1_com
     ServerName domain1.com
     ErrorLog logs\domain1.com-error_log
     CustomLog logs\domain1.com-access_log common

     #aliases

     Alias /cfadmin "D:\InetPub\wwwroot\ColdFusionMX\CFIDE\administrator"
     #Alias /mailroot
     #Alias /rome

 </VirtualHost>

 # www.domain2.com host
 <VirtualHost *>
     ServerAdmin webmas...@domain2.com
     ServerAlias *.domain2.com
     DocumentRoot D:\inetpub\wwwroot\domain2_com
     ServerName domain2.com
     ErrorLog logs\domain2.com-error_log
     CustomLog logs\domain2.com-access_log common

 </VirtualHost>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bigreddastud  
View profile  
 More options Jan 11 2005, 2:55 pm
Newsgroups: macromedia.coldfusion.server_administration
From: "bigreddastud" <webforumsu...@macromedia.com>
Date: Tue, 11 Jan 2005 19:55:53 +0000 (UTC)
Local: Tues, Jan 11 2005 2:55 pm
Subject: Re: Coldfusion not working with Apache Virtual Hosts
OK, I've fixed my problem.

 I needed to have the CF module loading for each virtual host instead of as a
site wide directive.  In order to fix this I put the <IfModule> code in each
virtual host definition.  Just copy/paste it from the main server section into
all virtual hosts.

 This is not really stated anywhere much that I could find.  I saw several
places (one here at Macromedia too) that showed setting up multiple instances
of the CF Server, but none that I found really enumerated details on my simple
situation.  I've documented it here as an FYI to others:

 # www.domain1.com host
 <VirtualHost *>
     ServerAdmin webmas...@domain1.com
     ServerAlias *.domain1.com
     DocumentRoot D:\inetpub\wwwroot\domain1_com
     ServerName domain1.com
     ErrorLog logs\domain1.com-error_log
     CustomLog logs\domain1.com-access_log common

     #aliases

     Alias /cfadmin "D:\InetPub\wwwroot\ColdFusionMX\CFIDE\administrator"
     #Alias /mailroot
     #Alias /rome
        <IfModule mod_jrun20.c>
            JRunConfig Verbose false
            JRunConfig Apialloc false
            JRunConfig Ignoresuffixmap false
            JRunConfig Serverstore
"C:/CFusionMX/runtime/lib/wsconfig/1/jrunserver.store"
            JRunConfig Bootstrap 127.0.0.1:51010
            #JRunConfig Errorurl <optionally redirect to this URL on errors>
            AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc
        </IfModule>

 </VirtualHost>

 # www.domain2.com host
 <VirtualHost *>
     ServerAdmin webmas...@domain2.com
     ServerAlias *.domain2.com
     DocumentRoot D:\inetpub\wwwroot\domain2_com
     ServerName domain2.com
     ErrorLog logs\domain2.com-error_log
     CustomLog logs\domain2.com-access_log common

        <IfModule mod_jrun20.c>
            JRunConfig Verbose false
            JRunConfig Apialloc false
            JRunConfig Ignoresuffixmap false
            JRunConfig Serverstore
"C:/CFusionMX/runtime/lib/wsconfig/1/jrunserver.store"
            JRunConfig Bootstrap 127.0.0.1:51010
            #JRunConfig Errorurl <optionally redirect to this URL on errors>
            AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc
        </IfModule>

 </VirtualHost>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jim.wel...@gmail.com  
View profile  
 More options Mar 1 2005, 4:07 pm
Newsgroups: macromedia.coldfusion.server_administration
From: jim.wel...@gmail.com
Date: 1 Mar 2005 13:07:55 -0800
Local: Tues, Mar 1 2005 4:07 pm
Subject: Re: Coldfusion not working with Apache Virtual Hosts
bigreddastud,
Thank you. Thank you. Thank you. This problem has been plagueing us for
months. We have a complicated architecture and fingers were being
pointed every which way. This message clearly identified our problem.
The solution made the problem disappear immediately. Very astute
observation about .cfm caching.

Thank You,
Jim Weller
University of Alaska Anchorage


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google