FYI - consider all this at your own risk. I'm not an Apache / Tomcat guru:

When it comes to my OpenBD apps, my /etc/apache2/sites-available/default file just tosses the request over to Tomcat via mod_ajp - and Tomcat handles all that pathing stuff that's local to each app. Consider this abridged version:
<VirtualHost *:80>
#[ALL THE STUFF YOU GET IN A DEFAULT APACHE CONFIG, LIKE]	
	ServerAdmin webmaster@localhost
	DocumentRoot /var/www
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	CustomLog ${APACHE_LOG_DIR}/access.log combined
#[BLAH BLAH AND SO ON]
</VirtualHost>

# [THIS IS TO AN OPENBD INSTANCE - TOMCAT ON 8009]
<VirtualHost *:80>
	ServerName todo.akh.com
	ProxyPass / ajp://0.0.0.0:8009/
	ProxyPassreverse / ajp://0.0.0.0:8009/
</VirtualHost>

Now I'm running on an Amazon marketplace instance, my setup works with 0.0.0.0. You may need to use 127.0.0.1 above.

Over on the Tomcat side, this is tacked on to the end of my /etc/tomcat6/server.xml file (inside the Engine node) and points to where my app sits.

    <Host name="todo.akh.com">
        <Context path="" docBase="/var/lib/tomcat6/webapps/todo"/>
    </Host>

That's it. Restart Apache and Tomcat, and it just works for me.

Regarding scheduled tasks, mine would run once, more than once, once per process, or not at all. So I just gave up on OpenBD's internal methods for this and use OS cron jobs. This one runs once a day as root and throws away the returned page:
wget -O /dev/null http://todo.akh.com/statusMe.cfm 2> /dev/null

FYI, My app's security bypasses the login redirect for calls coming from a local IP to this path.

HTH,
Al Holden


On 7/3/2014 12:51 AM, Phillip Gardner wrote:
Hi Guys,

I know this is a topic that has a lot of entries in the forum, however with my limited understanding of Tomcat setup, the suggested answers are vague to me. So hopefully somebody can help me out.

I have OpenBD version 2.0 on Tomcat 7.0.37 on a Fedora 17 host. I use apache 2.2.23 as the front end to support a number of virtual sites and the inclusion of php for a cacti network monitoring service.

The issue I have is with the openbd application and tomcat where any scheduled task in openbd runs twice almost at the same instant. I know this to be the case as a number of the scheduled tasks log entries into a mysql database and since moving to the openbd coldfusion server there are two entries in the database for each run of the scheduled task.

I understand that the issue is possibly related to the overlapping of appbases for applications under tomcat and in my case I am expecting that the overlapping appbase parameters are for the ROOT application and the openbd application.

My problem is that I cannot work out the correct setup for the <host> setting under tomcat and the corresponding virtual host entry in apache.

Currently I have the following which works but obviously causes scheduled task issues.
In Apache, the virtual host is configured as

NameVirtualHost intranet.oratek.com.au
<VirtualHost intranet.oratek.com.au>
        ServerName intranet.oratek.com.au
        DocumentRoot /usr/share/apache-tomcat-7.0.37/webapps/openbd/intranet
        ErrorLog /var/log/httpd/ajp.error.log
        CustomLog /var/log/httpd/ajp.log combined
        DirectoryIndex index.cfm

                <Proxy *>
                        AddDefaultCharset Off
                        Order deny,allow
                        Allow from all
                </Proxy>

                ProxyPassMatch ^/(.+.cf[cm])(/.*)?$ ajp://127.0.0.1:8009/openbd/intranet/$1
                ProxyPassReverse / ajp://127.0.0.1:8009/openbd/

</VirtualHost>
 
In Tomcat, the host is configured with
      <Host name="intranet.oratek.com.au" appBase="webapps">
        <Conext path="" docBase="/usr/share/apache-tomcat-7.0.37/webapps/openbd/intranet" />
      </Host>

CATALINA_HOME = /usr/share/apache-tomcat-7.0.37
My coldfusion application lives at /usr/share/apache-tomcat-7.0.37/webapps/openbd/intranet/

Everything else is as per a standard install.

How should I have the host setups to resolve the scheduled task issue ?

Thanks
Phil

Disclaimer: Whilst every attempt has been made to ensure that material contained in this email is free from computer viruses or other defects, the attached files are provided, and may only be used, on the basis that the user assumes all responsibility for use of the material transmitted. This email is intended only for the use of the individual or entity named above and may contain information that is confidential and privileged. If you are not the intended recipient, please note that any dissemination, distribution or copying of this email is strictly prohibited. If you have received this email in error, please notify us immediately by return email or telephone 03 5625 4600 and destroy the original message. The contents of this message are provided without responsibility in law for their accuracy or otherwise and without assumption of a duty of care by the Warragul District Parent Controlled Christian School Association Incorporated trading as Chairo Christian School. --
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

---
You received this message because you are subscribed to the Google Groups "Open BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

--
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

---
You received this message because you are subscribed to the Google Groups "Open BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to