Professional Web Applications Themes

Apache Virtual Hosts - Coldfusion Server Administration

I am currently running Coldfusion mx 7 and apache 2.0.52 with virtual hosts. I've seen this same question asked on many forums with multiple solutions, but none have worked for me. The problem is that no matter which domain I try to access coldfusion files on, coldfusion looks for the files in /opt/coldfusionmx7/wwwroot directory instead of each separate hosts directory in /var/www/vhosts/domain1/httpdocs, /var/www/vhosts/domain2/httpdocs, etc... I've tried running the wsconfig in every possible combination of files and directories with no luck. Currently I've resorted to manually editing everything. I've tried setting up separate stores and pointing each host to a different ...

  1. #1

    Default Apache Virtual Hosts

    I am currently running Coldfusion mx 7 and apache 2.0.52 with virtual hosts.
    I've seen this same question asked on many forums with multiple solutions, but
    none have worked for me. The problem is that no matter which domain I try to
    access coldfusion files on, coldfusion looks for the files in
    /opt/coldfusionmx7/wwwroot directory instead of each separate hosts directory
    in /var/www/vhosts/domain1/httpdocs, /var/www/vhosts/domain2/httpdocs, etc...
    I've tried running the wsconfig in every possible combination of files and
    directories with no luck. Currently I've resorted to manually editing
    everything. I've tried setting up separate stores and pointing each host to a
    different store and I've tried pointing them all at the same one. Here's part
    of my httpd.conf file:

    # JRun Settings
    LoadModule jrun_module /opt/coldfusionmx7/runtime/lib/wsconfig/1/mod_jrun20.so
    <IfModule mod_jrun20.c>
    #JRunConfig Verbose false
    JRunConfig Apialloc false
    JRunConfig Ssl false
    JRunConfig Ignoresuffixmap false
    #JRunConfig Serverstore
    /opt/coldfusionmx7/runtime/lib/wsconfig/1/jrunserver.store
    #JRunConfig Bootstrap 127.0.0.1:51011
    #JRunConfig Errorurl <optionally redirect to this URL on errors>
    #JRunConfig ProxyRetryInterval 600
    #JRunConfig ConnectTimeout 15
    #JRunConfig RecvTimeout 300
    #JRunConfig SendTimeout 15
    AddHandler jrun-handler .cfm .cfc .cfml .cfr .cfswf .jsp .jws
    </IfModule>

    <VirtualHost 123.456.789.123:80>
    ServerName domain1:80
    ServerAlias [url]www.domain1[/url]
    UseCanonicalName Off
    SuexecUserGroup rmillar psacln
    DoentRoot /var/www/domain1/httpdocs
    CustomLog /var/www/vhosts/domain1/statistics/logs/access_log plesklog
    ErrorLog /var/www/vhosts/domain1/statistics/logs/error_log
    <IfModule mod_jrun20.c>
    JRunConfig Verbose false
    #JRunConfig Apialloc false
    #JRunConfig Ssl false
    #JRunConfig Ignoresuffixmap false
    JRunConfig Serverstore
    /opt/coldfusionmx7/runtime/lib/wsconfig/1/jrunserver.store
    JRunConfig Bootstrap 127.0.0.1:51011
    #JRunConfig Errorurl <optionally redirect to this URL on errors>
    #JRunConfig ProxyRetryInterval 600
    #JRunConfig ConnectTimeout 15
    #JRunConfig RecvTimeout 300
    #JRunConfig SendTimeout 15
    #AddHandler jrun-handler .cfm .cfc .cfml .cfr .cfswf .jsp .jws
    </IfModule>
    <IfModule mod_userdir.c>
    UserDir /var/www/vhosts/domain1/web_users
    </IfModule>
    ScriptAlias /cgi-bin/ /var/www/vhosts/domain1/cgi-bin/
    Alias /plesk-stat /var/www/vhosts/domain1/statistics/
    Alias /hcl /var/www/vhosts/default/hcl
    Alias /webstat /var/www/vhosts/domain1/statistics/webstat
    Alias /webstat-ssl /var/www/vhosts/domain1/statistics/webstat-ssl
    Alias /ftpstat /var/www/vhosts/domain1/statistics/ftpstat
    Alias /anon_ftpstat /var/www/vhosts/domain1/statistics/anon_ftpstat
    <IfModule mod_ssl.c>
    SSLEngine off
    </IfModule>
    <Directory /var/www/vhosts/domain1/httpdocs>
    <IfModule mod_perl.c>
    <Files ~ (\.pl$)>
    SetHandler perl-script
    PerlHandler ModPerl::Registry
    Options ExecCGI
    allow from all
    PerlSendHeader On
    </Files>
    </IfModule>
    <IfModule mod_perl.c>
    <Files ~ (\.asp$)>
    SetHandler perl-script
    PerlHandler Apache::ASP
    PerlSetVar Global /tmp
    </Files>
    </IfModule>
    <IfModule sapi_apache2.c>
    php_admin_flag engine on
    php_admin_flag safe_mode on
    php_admin_value open_basedir "/var/www/vhosts:/tmp"
    </IfModule>
    <IfModule mod_php5.c>
    php_admin_flag engine on
    php_admin_flag safe_mode on
    php_admin_value open_basedir "/var/www/vhosts:/tmp"
    </IfModule>

    </Directory>

    Alias "/error_docs" "/var/www/vhosts/domain1/error_docs"
    ErrorDoent 400 /error_docs/bad_request.html
    ErrorDoent 401 /error_docs/unauthorized.html
    ErrorDoent 403 /error_docs/forbidden.html
    ErrorDoent 404 /error_docs/not_found.html
    ErrorDoent 500 /error_docs/internal_server_error.html
    </VirtualHost>

    Of course domain1 is where my domain goes and 123.456.789.123 is where my real
    ip goes. Also, I have no problem accessing non-coldfusion files from their
    respective domain. But when I try to access files that exist on a virtual host
    I get a file not found error, because it looks in the /opt/coldfusionmx7/wwroot
    directory. Any suggestions are greatly appreciated.
    Thanks,
    -Ryan

    fluffhead92 Guest

  2. #2

    Default Re: Apache Virtual Hosts

    It appears that through all my manual editing I've lost ground and could no
    longer get some of the basic functionality from my site. So now I've recreated
    the domain from Plesk 8.0 and I'm going to start from scratch. My cf_root is
    /opt/coldfusionmx7, my httpd.conf file is located in /etc/httpd/conf, and the
    apache binary is /usr/sbin/httpd. Each virtual host is located at
    /var/www/vhosts/domain1, /var/www/vhosts/domain2, etc... However with plesk,
    there is non httpd.conf file for each virtual host, but there is a
    /var/www/vhosts/domain1/conf/httpd.include file that has the virtual host
    information and says it should not be edited. Each httpd.include file is
    included in /etc/httpd/conf.d/zz010_psa_httpd.conf, which is included in the
    main httpd.conf. So if anyone has any experience in multihoming, do you mind
    walking me through the process?
    Thanks,
    Ryan

    fluffhead92 Guest

  3. #3

    Default Re: Apache Virtual Hosts

    I am having the same problem and going crazy trying to figure this out. Adobe
    isnt helping matters much either. They should have stayed out of the realm of
    Cold Fusion and stuck to making image editors and PDF's. I have tried to
    install CF5 on my server and it wont work either(libstdc++ issues - no help
    from Adobe). Last night I spent about 6 hours messing with MX7 on my
    RHEL3/Pleask 8 system and never got around the whole doent root problem. If
    the people from adobe are reading this ... PLEASE offer some help on this
    matter. We pay way too much for this application to be going through problems
    like this. Or maybe you should just sell this to microsoft so we could at least
    expect these kinds of problems and the limited support!

    As to this issue, Ryan ... I am working like crazy to solve this and have
    about a dozen others working on it as well ... as soon as we have a solution I
    will post it here. If you have found anythingout, please let me know.

    Thanks

    John



    FlaglerCom Guest

  4. #4

    Default Re: Apache Virtual Hosts

    I think the problem has to do with the Plesk 8 setup. When you use wsconfig
    you have to specify the conf file directory. However, wsconfig looks for
    httpd.conf while the virtual host settings are stored in an httpd.include file.
    So wsconfig doesn't see the <virtual host> script. When I took the plesk file
    out of the picture and added the virtual hosts in the httpd.conf file myself,
    coldfusion worked fine (Plesk crapped out, though). I also tried creating a
    link to httpd.include called httpd.conf. The problems is that you can't make
    manual changes to httpd.include, because Plesk will overwrite them. So that
    isn't an option. Do you have support for the coldfusion managment interface in
    Plesk. I don't and I'm wondering if it will work with if Plesk does the
    configuration, it might just work. I think the addon is about $50. I don't
    want to spend the money unless I know it will work though. Let me know if you
    find anything.
    -Ryan

    fluffhead92 Guest

  5. #5

    Default Re: Apache Virtual Hosts

    I finally figured out my problem. It had to do with permissions. On all the
    guides I read and followed trying to install coldfusion, they either said use
    the default 'nobody' user or create a 'cfmx' user. Finally I tried 'apache'
    for the user and everything worked fine. I guess it just needs to be the user
    that apache is running under. I also setup the connector during the setup and
    everything works fine. No extra wsconfig, chmods, or anything. Hope this
    helps anyone else having the same problem.
    -Ryan

    fluffhead92 Guest

Similar Threads

  1. Using vspider.exe to search Virtual Hosts on Apache
    By UniWebDude in forum Coldfusion - Advanced Techniques
    Replies: 2
    Last Post: July 20th, 05:27 PM
  2. cfmx7 apache virtual hosts
    By muchagainst in forum Macromedia ColdFusion
    Replies: 0
    Last Post: March 2nd, 12:10 PM
  3. Coldfusion not working with Apache Virtual Hosts
    By jim.weller@gmail.com in forum Coldfusion Server Administration
    Replies: 0
    Last Post: March 1st, 09:07 PM
  4. [PHP-DEV] chrooting virtual hosts in apache
    By Robin Ericsson in forum PHP Development
    Replies: 0
    Last Post: August 29th, 11:51 AM
  5. RedHat 9, apache 2.0: Trouble with virtual hosts + SSL
    By Carlos Moreno in forum Linux Setup, Configuration & Administration
    Replies: 0
    Last Post: July 23rd, 11:47 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139