Apache Alias and Directory

Working with:
Fedora Core 3
Apache 2.0.52
BlueDragon JX 6.2.1 (CF MX)
I have created a alias in httpd.conf to /forum
Inside /form is subdirectory installation
When I go to the actual URL (where it really is) everything works the way it is supposed to.  That is when I browse into the installation directory, the Application.cfm file in /forum is referenced properly.  If I am on one of the other domains where /forum should be available, CF does not "find" Application.cfm.
I have used Alias and Directory and tried everything I could think of in the envelope
Alias /forum "/xxx/controlpanel/_modules/forum/"

<Directory /xxx/controlpanel/_modules/board >
    Options Indexes FollowSymLinks MultiViews ExecCGI Includes
    AllowOverride None
    Order allow,deny
    Allow from all
    AcceptPathInfo On
    Satisfy Any
</Directory>
Len45Asked:
Who is Participating?
 
gdemariaCommented:

That is weird, I would suspect that, regardless of any settings in apache, coldfusion would simply walk up the directory structure as you suggested.   That's why I'm not focusing on the apache settings, seems like it should just look at the directory structure.

Perhaps you can try creating a few little test Application.cfm files and place them in various locations to see what fires (if any).

Application.cfm
<cfoutput>I am Here: #getTemplatePath()#</cfoutput>
<cfabort> <!--- if you need to kill processing to see it ---->

Place a file like this in your _modules folder, board folder, installation folder and just play with it to see what is firing and what is not..

You may get an idea of what path the coldfusion is using to search for the Application.cfm file.

0
 
gdemariaCommented:

 try adding the folder as a mapping in the coldfusion administrator
0
 
Len45Author Commented:
Tried that, should have worked, but didn't
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Len45Author Commented:
The way I understand it mapping works for cfinclude, cfmodule and cfs's ??
0
 
gdemariaCommented:

 yes it does.  To be honest, I am a little confused by the structure in your question.

 Can you identify your folder hierarchy.   Rereading it, it sounds like perhaps your application.cfm file isn't in a folder above your current folder, but in a sibling one...
0
 
Len45Author Commented:
/xxx/xxx/_modules/forum/installation/
Application.cfm is in forum
0
 
Len45Author Commented:
laid it out a bit differently in my original question, sorry to confuse.  But Application.cfm (LINUX need "A" not "a", but you know that) is in the directory "above" installation and is accessed when I go to the web space where it actually resides

so is I go to
http://mydomain.com/controlpanel/_modules/board/installation/index.cfm -- all is well with the world

I have used Alias and Directory in the httpd.conf to "map" /forum to that directory and if I go to another domain on my server

http://AnotherDomain.com/forum/installation/index.cfm -- it is not "seeing" Application.cfm which would now be in the forum directory.  
0
 
Len45Author Commented:
I am wondering if I have my <directory> set up right?  Anyone have suggestions?
0
 
gdemariaCommented:

Application.cfm is found by an upward search of physical folders, not related to the URL or mappings, right?  So if your template launched is in this hypothetical directory    /A/B/C/D/E/index.cfm  your application.cfm needs to be in A,B,C,D or E.  

So in this example,
http://AnotherDomain.com/forum/installation/index.cfm 
Directory:
xxx/controlpanel/_modules/forum/installation/

It seems like it would work if Application.cfm is located in your forum directory.


In this example, installation, is inside of board, not inside of forum, so I would think it would not find it..
http://mydomain.com/controlpanel/_modules/board/installation/index.cfm 
Directory:
/xxx/controlpanel/_modules/board/installation/


What if you place the Application.cfm inside of _modules ?  That seems to be shared by both?

Do you only have one Application.cfm file, or are you attempting to launch different ones depending on something.  If only one, place it in the web root ?

0
 
Len45Author Commented:
gdemaria -- thanks for sticking with me on this one, it is really weird

Base on the Alias that I have set up in the apache conf file /forum and /board are the same actual directory on the server, that what is so weird.

CF usually does not care about names... it just goes up the "tree" till it finds a Application.cfm file -- maybe names matter in a case like this?

When I am in installation and pull up index.cfm it is exactly the same file, if just does not reference Application.cfm in the parent directory when I am in forum -- this has got to be an apache deal with the Alias and Directory "requests"


0
 
Len45Author Commented:
what is really weird is that if I do a <cfinclude template="../Application.cfm"> it works.  I will play a bit with your suggestion -- especially the getTemplatePath()

Thanks
0
 
Len45Author Commented:
gdemaria

Your code helped me track down a problem with how I had set up the Alias directive in the apache.conf file, did not have anything to do with CF (or in my case BlueDragon), thanks for the help... don't spend all those points in one place, eh?  :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.