[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Apache Alias and Directory

Posted on 2007-03-27
12
Medium Priority
?
1,012 Views
Last Modified: 2013-12-24
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>
0
Comment
Question by:Len45
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 4
12 Comments
 
LVL 39

Expert Comment

by:gdemaria
ID: 18803528

 try adding the folder as a mapping in the coldfusion administrator
0
 

Author Comment

by:Len45
ID: 18803611
Tried that, should have worked, but didn't
0
 

Author Comment

by:Len45
ID: 18803651
The way I understand it mapping works for cfinclude, cfmodule and cfs's ??
0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
LVL 39

Expert Comment

by:gdemaria
ID: 18803731

 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
 

Author Comment

by:Len45
ID: 18803881
/xxx/xxx/_modules/forum/installation/
Application.cfm is in forum
0
 

Author Comment

by:Len45
ID: 18803918
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
 

Author Comment

by:Len45
ID: 18809310
I am wondering if I have my <directory> set up right?  Anyone have suggestions?
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 18809593

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
 

Author Comment

by:Len45
ID: 18810825
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
 
LVL 39

Accepted Solution

by:
gdemaria earned 1500 total points
ID: 18811052

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
 

Author Comment

by:Len45
ID: 18811078
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
 

Author Comment

by:Len45
ID: 18837567
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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What You Need to Know when Searching for a Webhost Provider
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question