5

I have tried some combinations of ProxyPass, ProxyPassReverse and ProxyHTMLURLMap but I'm still not having much luck. I just would like to be able to hit the printers in CUPS by going to www.printerhost.com/printers/printername rather than having to add a port 631 or have CUPS listen on port 80.

As requested, here is the configuration file:

LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule xml2enc_module modules/mod_xml2enc.so

NameVirtualHost *:80

<VirtualHost *:80>
   ServerName blah.yours.com
   JkMount /* balancer 
   JkMount /jkmanager jk-status 
   JkUnMount /cups* balancer
   ProxyRequests Off
   ProxyPass /cups/ http://localhost:631/
   ProxyHTMLURLMap http://localhost:631 /cups
   <Location /cups/>
     ProxyPassReverse /
     ProxyHTMLEnable On
     ProxyHTMLURLMap / /cups/
   </Location>
</VirtualHost>
Greymeister
  • 185
  • 1
  • 9
  • I haven't done it, but I don't see why this wouldn't work. can you post your exact ProxyPass directives, and also describe what issues you're seeing when you try to browse to your printers? – wes Feb 02 '11 at 16:19
  • I went by an example found [here](http://www.wlug.org.nz/ApacheReverseProxy) and tried using mod_proxy_html. Here's my configuration, it's slightly complicated by the fact that I am also hosing a mod_jk mount on this virtual host, perhaps that is the root of the problem though. – Greymeister Feb 02 '11 at 19:42

2 Answers2

2

Looks like the problem goes away using a simple ProxyPass and ProxyPassReverse but only when proxying "/". I guess proxying CUPS to any other path does not work.

Greymeister
  • 185
  • 1
  • 9
0

I have stumbled upon this site http://www.wlug.org.nz/ApacheReverseProxy.

They solved the problem by combining mod_proxy with mod_proxy_html for changing the links inside the CUPS web pages.

However I personally think that the CUPS web interface should be somehow enhanced and maybe rewritten in PHP or similar as the present web interface (based on CGI) is somehow inconsistent (in some places we have relative urls as admin while in others as /admin).

Daniel Voina
  • 188
  • 1
  • 10