why Coldfusion-MySQL-Apache isn't running on l

2019-09-15 02:24发布

问题:

Newbie question - my first attempt at Coldfusion/MySQL and getting it to run locally.

I'm running Apache Webserver (2.2), I have importet two .sql files into MySQL (5.2.) workbench, forward engineered a database from these, setup working database connection and MySQL Server. This is also running. In Coldfusion8 Admin I added my database as a data source.

I thought this would be enough :-)

Still, on http://localhost I'm still only getting an index of all files in my Apache htdocs folder. If I open one of the files it just shows the Coldfusion Markup/HTML source code. Nothing parsed.

Thanks for any hints on what I could be missing?

EDIT:
Three questions trying to implenent:
1. Can I load modules using absolute paths, like D:/Coldfusion8/lib...?
2. My lib/wsconfig folder only contains a dll file named jrunwin32.dll. Trying to use this?
3. The lib/wsconfig folder does not contain a jrunserver.store file. Not sure what to do here

回答1:

It sounds as if your Apache config is not correct, as it doesn't sound as if it's having the cfm files handled correctly.

First of all, is there a specific reason for using CF8? CF9 has been around for a while, so if going from scratch then I'd advise taking a look at that instead.

That aside, I'd check for the following in your httpd.conf (or whatever your apache config file is named)

Firstly, that .cfm is acceptable as a DirectoryIndex (can have other indexes as well)

DirectoryIndex index.cfm

Secondly, that the JRUN handler is configured properly (so again, in httpd.conf)

LoadModule jrun_module /opt/coldfusion8/runtime/lib/wsconfig/1/mod_jrun22.so
<IfModule mod_jrun22.c>
    JRunConfig Verbose false
    JRunConfig Apialloc false
    JRunConfig Ignoresuffixmap false
    JRunConfig Serverstore /opt/coldfusion8/runtime/lib/wsconfig/1/jrunserver.store
    JRunConfig Bootstrap 127.0.0.1:51801
    AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
</IfModule>

This is taken from my development VM, I have CF8 as a single-server install in /opt/coldfusion8/

Once you have those lines in (with the paths/ports etc appropriate for your environment) restart apache and it should work fine.

If you have installed CF8 in a Multiserver etc. install then please specify and will look to adjust my advice accordingly