Running Mingle on existing Apache (so we dont have to open ports)#308

Subscribe to Running Mingle on existing Apache (so we dont have to open ports) 11 post(s), 5 voice(s)

 
Avatar Mike G. 20 post(s) #734

I’d like to run Mingle and Mantis on the same server…While I have it running now on port 80 and 81, for firewall reasons I’d like to run both on port 80.
Then access them like…
servername/mingle
servername/mantis

Is this an option?

Cheers,

Mike

 
Avatar smerritt 1 post #741

Just a suggestion. We had the same issue here and got around it by front-ending the requests through a vanilla Apache server w/ mod_proxy enabled. Then we just set up two virtual hosts, one for mingle and another for mantis, and had each of them proxy all incoming requests directly to their corresponding port. That way only the Apache instance was exposed on port 80.

 
Avatar Barrow Kwan 8 post(s) #742

There are couple of options

1. Use VirtualHost as Smerritt said and here is an example apache configuration. ( this is just a general configuration example). Please make sure you have enable mod_proxy and change mingle to run on other port than 80. eg mingle is running on port 82 and mantis is running on port 81. With this example, you can access mingle with http://mingle.example.com and mantis with http://mantis.example.com. Both mingle.example.com and mantis.example.com has the same ip address ( 1.2.3.4 ) on DNS

Listen 1.2.3.4:80
NameVirutalHost 1.2.3.4:80
<virtualhost 1> Servername mingle.example.com ProxyPass / http://localhost:82/ ProxyPassReverse / http://localhost:82/
</virtualhost>

<virtualhost 1> Servername mantis.example.com ProxyPass / http://localhost:81/ ProxyPassReverse / http://localhost:81/
</virtualhost>

2. If you really want use one hostname to serve both mingle and mantis ( ie http://www.example.com/mingle and http://www.example.com/mantis ). You can try this two approach ( The first approach won’t work all the time, so you have to test it through )

a. Same as one above but with one Virtualhost configuration
Listen 1.2.3.4:80
NameVirutalHost 1.2.3.4:80
<virtualhost 1> Servername www.example.com ProxyPass /mingle http://localhost:82/ ProxyPassReverse /mingle http://localhost:82/ ProxyPass /mantis http://localhost:81/ ProxyPassReverse /mantis http://localhost:81/
</virtualhost>

b) option a) above won’t work for all applications, then you will need to use mod_proxy_html

I will recommend option 1 above ( ie two virutalhosts configuration ).

 
Avatar Mike G. 20 post(s) #1453

Barrow… I finally got around to trying this – no luck.

I could get Apache to serve up (proxy) the pages, but no formatting or images came across, and, Mingle tries to redirect to /mingle a few times that I couldn’t get around.

Anyone got this running successfully? Anything different with Mingle 2.0 (I tried this with 1.1).

Cheers,

Mike

 
Avatar Barrow Kwan 8 post(s) #1454

Mike, we realized the issue and mingle team is working for a fix on the coming release. stay tune and sorry for the confusion

 
Avatar Mike G. 20 post(s) #1457

Ah, maybe you want to take it off of here, in that case – http://studios.thoughtworks.com/support

That indicates that it is a working/supported solution.

Regards,

Mike

 
Avatar ibrandt 3 post(s) #1533

Well, I gave mod_proxy_html 3.0.0 the old college try, but I’m deciding to punt. In case someone wants to pick up the torch here’s the config I had going for Mingle listening on localhost:8083 and an SSL virtual host:

# Alias Mingle's static content as this vhosts document root is somewhere else.
Alias /mingle /home/mingle/mingle/public
<Directory /home/mingle/mingle/public>
       Options Indexes FollowSymLinks
       Order allow,deny
       Allow from all
</Directory>

# Deactivate Forward Proxying.
ProxyRequests off

# Enable mod-proxy-html for the vhost.
SetOutputFilter proxy-html

# Process script tags and event attributes.
ProxyHTMLExtended on

ProxyPass /mingle/ http://localhost:8083/
ProxyHTMLURLMap http://my.host.local /mingle <location /> ProxyPassReverse http://my.host.local/ ProxyPassReverseCookiePath / / # Use 'ce' flags as '/' is too aggressive a pattern for scripts... ProxyHTMLURLMap / /mingle/ ce # More specific script rules... ProxyHTMLURLMap /project /mingle/project </location>

This got me most of the way, but mod_proxy_html was choking on some of the JavaScript as in the following example:

if (Element.visible('collapsible-content-for-Favorites')) {
  eval(new Ajax.Request('/mingle/projects/xp_template_2_0/profile/update_user_display_preference/1?user_display_preference[favorites_visible]=true', {asynchronous:true, evalScripts:true})) 
} else {
  eval(new Ajax.Re/mingle/projectprojects/xp_template_2_0/profile/update_user_display_preference/1?user_display_preference[favorites_visible]=false', {asynchronous:true, evalScripts:true}))
}

Worked for the first Ajax.Request, but mangled the second one. Character encoding issues perhaps? The mod_proxy_html FAQ warns of this possibility.

So off to setup another IP, self-signed cert, and virtual host and DNS entry. Looking forward to that fix in a future version.

~Ian

 
Avatar Barrow Kwan 8 post(s) #1669

This has been fixed in 2.0.1 and here is the instruction

In Mingle

edit config/jetty.xml, look for the line ( Unless you have modified this file already, you should be able to find this on line 69 )

Before you edit this file, please make a backup

<Set name="contextPath">/</Set>

and change it to

<Set name="contextPath">/mingle</Set>



In Apache

Listen 1.2.3.4:80
NameVirutalHost 1.2.3.4:80
<Virtualhost 1.2.3.4:80>
  Servername mingle.example.com
  ProxyPass /mingle http://localhost:8080/mingle
  ProxyPassReverse /mingle http://localhost:8080/mingle
</virtualhost>

 
Avatar Mike G. 20 post(s) #1715

Has this been tested/works for anyone else?

When using this syntax, I get

service httpd start
Starting httpd: Syntax error on line 1014 of /etc/httpd/conf/httpd.conf:
ProxyPass can not have a path when defined in a location />[root@localhost mingle]#
 
Avatar Mike G. 20 post(s) #1716

Ok – I found the problem was I copy/pasted this code – there is a space in between http and ://

I have it working… But, it is super slow. Anyone else experience this? It took 45-60 seconds to bring up the login page, and 2 mins for the first project page. If I access Mingle directly on port 81, it is much much snappier.

Thanks,

Mike

 
Avatar SC 2 post(s) #1765

You can try to use ajp instead of plain http, this could speed things up, but we are currently using http proxying on the production server and we aren’t suffering from noticeable performance issues.