I want to serve from /var/www/html - update

Dear Group

I have been a long-term user of ColdFusion starting out when it was still
an Allaire product. I am now stopping using it because I am sick of Adobe
and it is hard to keep secure.

I have now installed Lucee with Tomcat on a Centos 6.6 distribution. I
chose /opt/lucee as the location and port 8888 for the Tomcat server. I
hardened it as per the usual things.

The installation was successful and I connected Apache with Tomcat during
the installation process. I can access the Lucee admin (server/web) from
port 8888 and Apache is serving
html fine from 80.

All my files are served (in CF) from /var/www/html and I want to maintain
that.

I have read a heap of instructions etc about how to change the webroot in
Tomcat.

As best as I could understand I did this:

  1. In the file /opt/lucee/tomcat/conf/server.
    xml

I added

    <Host name="name of server" appBase="webapps">
         <Context path="" docBase="/var/www/html" />
         <Alias>name of server</Alias>
    </Host>

saved it and restarted lucee

  1. In /etc/httpd/conf/httpd.config I added

<VirtualHost *:80>
ServerAdmin AN EMAIL ADDRESS
DocumentRoot /var/www/html
ServerName name of server
ErrorLog logs/name of server-error_log
CustomLog logs/name of server-access_log common

I also added index.cfm to the DirectoryIndex

I saved it and restarted httpd

Result:

(a) Apache still serves html from Port 80

(b) When I try to call index.cfm from Port 80 (located in /var/www/html/) I
get the Apache error

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance
downtime or capacity problems. Please try again later.

(b) If I call server_name_domain:8888 I get the contexts of index.cfm in
/var/www/html/

© I can still get

http://server_name_domain:8888/lucee/admin/web.cfm
http://e2.newcastle.edu.au:8888/lucee/admin/web.cfm and http://
http://e2.newcastle.edu.au:8888/lucee/admin/server.cfmserver_name_domain
http://e2.newcastle.edu.au:8888/lucee/admin/web.cfm
:8888/lucee/admin/server.cfm
http://e2.newcastle.edu.au:8888/lucee/admin/server.cfm

At that stage I am lost.

I guess it is a very simple adjustment and would appreciate help.

I always used stand-alone CF installations (that is not a java servlet set
up).

Thanks in advance.

best wishes
bill

Dear Terry and Jordan

Thanks for your assistance.

It was a SELinux issue

I have left it enforcing but established a rule to allow httpd to access
127.0.0.1:8888 using

/usr/sbin/setsebool -P httpd_can_network_connect=1

it now serves cfm files from my preferred directory.

best wishes
bill

you would need mod proxy, or mod_cfm, or mod_apj enabled.

for mod_proxy

make sure mod_proxy is enabled then add this to your apache configuration

Order deny,allow Allow from all ProxyPassMatch ^/(.*\.cfm)$ http://yourluciesite:8888/$1 ProxyPassReverse / http://yourluciesite:8888/

restart apache.On Thursday, May 28, 2015 at 4:26:22 AM UTC-4, Bill Mitchell wrote:

Dear Group

I have been a long-term user of ColdFusion starting out when it was still
an Allaire product. I am now stopping using it because I am sick of Adobe
and it is hard to keep secure.

I have now installed Lucee with Tomcat on a Centos 6.6 distribution. I
chose /opt/lucee as the location and port 8888 for the Tomcat server. I
hardened it as per the usual things.

The installation was successful and I connected Apache with Tomcat during
the installation process. I can access the Lucee admin (server/web) from
port 8888 and Apache is serving
html fine from 80.

All my files are served (in CF) from /var/www/html and I want to maintain
that.

I have read a heap of instructions etc about how to change the webroot in
Tomcat.

As best as I could understand I did this:

  1. In the file /opt/lucee/tomcat/conf/server.
    xml

I added

    <Host name="name of server" appBase="webapps">
         <Context path="" docBase="/var/www/html" />
         <Alias>name of server</Alias>
    </Host>

saved it and restarted lucee

  1. In /etc/httpd/conf/httpd.config I added

<VirtualHost *:80>
ServerAdmin AN EMAIL ADDRESS
DocumentRoot /var/www/html
ServerName name of server
ErrorLog logs/name of server-error_log
CustomLog logs/name of server-access_log common

I also added index.cfm to the DirectoryIndex

I saved it and restarted httpd

Result:

(a) Apache still serves html from Port 80

(b) When I try to call index.cfm from Port 80 (located in /var/www/html/)
I get the Apache error

Service Temporarily Unavailable

The server is temporarily unable to service your request due to
maintenance downtime or capacity problems. Please try again later.

(b) If I call server_name_domain:8888 I get the contexts of index.cfm in
/var/www/html/

© I can still get

http://server_name_domain:8888/lucee/admin/web.cfm
http://e2.newcastle.edu.au:8888/lucee/admin/web.cfm and http://
http://e2.newcastle.edu.au:8888/lucee/admin/server.cfmserver_name_domain
http://e2.newcastle.edu.au:8888/lucee/admin/web.cfm
:8888/lucee/admin/server.cfm
http://e2.newcastle.edu.au:8888/lucee/admin/server.cfm

At that stage I am lost.

I guess it is a very simple adjustment and would appreciate help.

I always used stand-alone CF installations (that is not a java servlet set
up).

Thanks in advance.

best wishes
bill

Glad you resolved the issue.