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

144 views
Skip to first unread message

Bill Mitchell

unread,
May 28, 2015, 4:26:22 AM5/28/15
to lu...@googlegroups.com
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

2. 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
</VirtualHost>

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/

(c) I can still get

http://server_name_domain:8888/lucee/admin/web.cfm and http://server_name_domain: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

Terry Whitney

unread,
May 28, 2015, 9:00:13 AM5/28/15
to lu...@googlegroups.com
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

<IfModule mod_proxy.c>
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPassMatch ^/(.*\.cfm)$ http://yourluciesite:8888/$1
ProxyPassReverse / http://yourluciesite:8888/
</IfModule>

restart apache.

Bill Mitchell

unread,
May 28, 2015, 7:36:09 PM5/28/15
to lu...@googlegroups.com
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

Jordan Michaels

unread,
May 28, 2015, 7:59:20 PM5/28/15
to lu...@googlegroups.com
Thanks for reporting back Bill. Glad you got it worked out. =)

-Jordan
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/b58f0325-65f6-489d-b06a-a5fc3b782c44%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Terry Whitney

unread,
May 29, 2015, 2:48:58 PM5/29/15
to lu...@googlegroups.com
Glad you resolved the issue.
 

Reply all
Reply to author
Forward
0 new messages