index.cfm before index.php

I'm running both apache, php and railo (open source coldfusion) on my linux server.  is there a way on apache force a page to invoke the index.cfm page before the index.php.  Seems like the php page gets displayed before the index.cfm page if both are on the server
COwebmasterAsked:
Who is Participating?
 
gr8gonzoConnect With a Mentor ConsultantCommented:
Either you have another DirectoryIndex file somewhere in your config, or you have an .htaccess file in that directory (or in a directory above it) - the .htaccess files (which are sometimes hidden files) can override the other Apache config so sometimes those can have DirectoryIndex lines, too.
0
 
gr8gonzoConsultantCommented:
There's a line in your Apache config somewhere that is called DirectoryIndex and it should contain all the files that can be used as the "default" file for a folder. You can change the order of preference on that line - just make index.cfm come first before index.php
0
 
Ray PaseurCommented:
No points for this comment, but if you are experimenting around with this, try index.html and see if that doesn't take precedence over the other two.  A nice feature of that kind of script ordering is that you can have an index.html and an index.php script.  The index.php script can be very elaborate, creating all kinds of neat stuff on the fly.  If you're interested in performance, and the index.php script is slow, it can capture its output buffers and write them into the index.html file.  Then you have a fast static page.  A cron job or other trigger can be used to load the index.php page, or you can simply delete the index.html page every few minutes.  Now you have a near-real-time web site with high performance.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
COwebmasterAuthor Commented:
I tried that but it didn't work.  I'm wondering if I would need to restart railo?
0
 
gr8gonzoConsultantCommented:
Did you restart Apache after updating the configuratoin? If so, there may be another DirectoryIndex directive somewhere else in your config.
0
 
COwebmasterAuthor Commented:
yes, I restarted apache but it still reads the php file first.  I even have a index.html file in there
0
 
COwebmasterAuthor Commented:
ok, i'll check on that.
0
 
COwebmasterAuthor Commented:
Thanks!
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.