skip to Main Content

Right, I know you can google this question and get lots of answers on it, but none of them seem to work for me.

I’ve got a brand new RHEL5 server, with the latest LAMP installation on it, and I’ve just installed Coldfusion 9.

When I visit my site, i get the Coldfusion error saying

File not found: /index.cfm

If I navigate to a html or php page it’s fine, they server properly. And the error I’m getting is the blue/grey coldfusion one, so the coldfusion server is working.

And I’ve narrowed the problem down to this…

/var/www/vhosts/site.co.uk/index.cfm – this gets served

but my site root is really

/var/www/vhosts/site.co.uk/httpdocs/index.cfm – coldfusion cannot see this file!

I found this

/var/www/vhosts/site.co.uk/index.cfm

in the cfserver.log. But I can’t find anywhere that references “/var/www/vhosts/site.co.uk/” as the root.

jrun-web.xml has a system path set to /var/www/vhosts/site.co.uk/httpdocs, and inside “bin/coldfusion” the DOCROOT is set to “/var/www/vhosts/site.co.uk/httpdocs”

This is a section of the httpd.include file:

# ATTENTION!
# DO NOT MODIFY THIS FILE OR ANY PART OF IT. THIS CAN RESULT IN IMPROPER PLESK
# FUNCTIONING OR FAILURE, CAUSE DAMAGE AND LOSS OF DATA. IF YOU REQUIRE CUSTOM
# MODIFICATIONS TO BE APPLIED TO THE CONFIGURATION, PLEASE, PERFORM THEM IN THE
# FOLLOWING FILE(S):
# /var/www/vhosts/site.co.uk/conf/vhost.conf
# /var/www/vhosts/site.co.uk/subdomains/<subdomain-name>/conf/vhost.conf

<VirtualHost 1.2.3.4:80>
    ServerName   site.co.uk:80
    ServerAlias  www.site.co.uk
    UseCanonicalName Off
    ServerAdmin  "[email protected]"
    DocumentRoot /var/www/vhosts/site.co.uk/httpdocs
    CustomLog  /var/www/vhosts/site.co.uk/statistics/logs/access_log plesklog
    ErrorLog  /var/www/vhosts/site.co.uk/statistics/logs/error_log
<IfModule mod_userdir.c>
    UserDir /var/www/vhosts/site.co.uk/web_users
</IfModule>
    Alias  /plesk-stat /var/www/vhosts/site.co.uk/statistics/
    <Location  /plesk-stat/>
        Options +Indexes
    </Location>
    <Location  /plesk-stat/logs/>
        Require valid-user
    </Location>
    Alias  /webstat /var/www/vhosts/site.co.uk/statistics/webstat
    Alias  /webstat-ssl /var/www/vhosts/site.co.uk/statistics/webstat-ssl
    Alias  /ftpstat /var/www/vhosts/site.co.uk/statistics/ftpstat
    Alias  /anon_ftpstat /var/www/vhosts/site.co.uk/statistics/anon_ftpstat
    Alias  /awstats-icon /var/www/html/awstats/icon
    <IfModule mod_ssl.c>
        SSLEngine off
    </IfModule>
    <Directory /var/www/vhosts/site.co.uk/httpdocs>
        <IfModule sapi_apache2.c>
            php_admin_flag engine on
            php_admin_flag safe_mode off
            php_admin_value open_basedir "/var/www/vhosts/site.co.uk/httpdocs:/tmp"
        </IfModule>
        <IfModule mod_php5.c>
            php_admin_flag engine on
            php_admin_flag safe_mode off
            php_admin_value open_basedir "/var/www/vhosts/site.co.uk/httpdocs:/tmp"
        </IfModule>
        Options -Includes -ExecCGI
    </Directory>
    <Directory /var/www/vhosts/site.co.uk/web_users>
        <IfModule sapi_apache2.c>
            php_admin_flag engine off
        </IfModule>
        <IfModule mod_php5.c>
            php_admin_flag engine off
        </IfModule>
    </Directory>
    <Directory "/var/www/vhosts/site.co.uk/httpdocs/CFIDE">
        AuthType Basic
        AuthName " "
        AuthUserFile /var/www/vhosts/site.co.uk/pd/d..httpdocs@CFIDE
        require  valid-user
    </Directory>
    ... 
    Omitting other directory tags 
    ...
    Include /var/www/vhosts/site.co.uk/conf/vhost.conf
</VirtualHost>

What am I doing wrong?

5

Answers


  1. Chosen as BEST ANSWER

    I've fixed it, the problem was the RUNTIME_USER variable was set in various places to "nobody".

    I managed to solve the problem thanks to this blog entry

    http://nzflew.blogspot.com/2009/04/changing-user-of-coldfusion-on-linux.html

    The "nobody" user didn't have access rights to view the files. I too had made the mistake of installing with the default "nobody" user name.

    Thanks for all your help anyway.


  2. In your apache vhosts.conf file, for the VirtualHost entry of the site in question, you need something like this:

    <VirtualHost some.ip.address:80>
    ServerName    www.yoursite.com
    DocumentRoot  /var/www/vhosts/site.co.uk/httpdocs
    ...other stuff...
    </VirtualHost>
    
    Login or Signup to reply.
  3. Going back to the start again. You said :

    And I’ve narrowed the problem down to
    this…
    /var/www/vhosts/site.co.uk/index.cfm –
    this gets served

    but my site root is really

    /var/www/vhosts/site.co.uk/httpdocs/index.cfm
    – coldfusion cannot see this file!

    This suggests that something in your main config or your vhost config is either messing with your document path or your vhost config is not being triggered and you are dropping through to a default server config that points at /site.co.uk instead of /site.co.uk/httpdocs

    The former is possibly a rewrite rule somewhere.
    The latter could be almost anything. Although I did just notice that you have an include of a vhost.conf in the foot of your VirtualHost config block.

    A suggestion would be to cut your config back to the absolute bare minimum eg. back to only serving html files with no hooks for php, coldfusion and all the other stuff that is in there and slowly put small elements back in when you’ve confirmed that the vhost is actually being picked up correctly.

    Login or Signup to reply.
  4. I had the same issue in a windows environment CF8/Apache2.2. Just changed the apache and CF Application services to run using the same user acct. Fixed it for me!

    Login or Signup to reply.
  5. The problem is simply adding both an alias for the CFIDE directory and a DirectoryIndex directive:

    Alias /CFIDE /{PATHTOTHEWEBROOT}/CFIDE
    
    DirectoryIndex index.html index.php **index.cfm** 
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search