[opencms-dev] proxy error

Inigo imunoz at zylk.net
Tue Jun 20 12:39:42 CEST 2006


Hello everybody:
   This is my first post in this mailing list. I am trying to setup a 
multi-site with OpenCMS. I have added in /etc/hosts the URLs for two 
different sites. Then, in the httpd.conf configuration file in Apache I 
have added the Virtual Hosts:

<VirtualHost *:80>
   ServerName empresa.zylk.net
   ServerAdmin imunoz at zylk.net
   DocumentRoot "/usr/local/tomcat/webapps/ROOT"
   ErrorLog logs/error.log

   SetEnvIf Request_URI "\/opencms\/*" redirect
   CustomLog logs/empresa-access.log common env=!redirect

   ProxyPass         /opencms/                 !
   RedirectPermanent /opencms/                 http://empresa.zylk.net/

   ProxyPass         /resources/               !
   ProxyPass         /export/                  !
     ProxyPass         /                         
http://127.0.0.1:8080/opencms/opencms/
   ProxyPassReverse  /                         
http://127.0.0.1:8080/opencms/opencms/
</VirtualHost>

<VirtualHost *:80>
   ServerName prueba.zylk.net
   ServerAdmin imunoz at zylk.net
   DocumentRoot "/usr/local/tomcat/webapps/ROOT/"
   ErrorLog logs/error.log
 
   # Log only non-redirect requests in "normal" log file
   SetEnvIf Request_URI "\/opencms\/*" redirect
   CustomLog logs/prueba-access.log common env=!redirect
 
   # Multi domain configuration: All pages in "/siteB/" are to be served 
from domain "siteB.org"
   ProxyPass         /opencms/           !
   RedirectPermanent /opencms/                 
http://prueba.zylk.net/                   
   ProxyPass         /resources/               !
   ProxyPass         /export/                  !

   ProxyPass         /                         
http://127.0.0.1:8081/opencms/opencms/prueba
   ProxyPassReverse  /                         
http://127.0.0.1:8081/opencms/opencms/prueba
</VirtualHost>

And I have added two connectors in the server.xml Tomcat's configuration 
file:
   <Connector port="8080"  maxThreads="150" minSpareThreads="25" 
maxSpareThreads="75"
              enableLookups="false" redirectPort="8443" acceptCount="100"
          proxyName="empresa.zylk.net" proxyPort="80"
              debug="0" connectionTimeout="20000"
              disableUploadTimeout="true" />

<Connector port="8081"
              maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
              enableLookups="false" redirectPort="8443" acceptCount="100"
          proxyName="prueba.zylk.net" proxyPort="80"
              debug="0" connectionTimeout="20000"
              disableUploadTimeout="true" />

Last but not least, I have added in 
webapps/opencms/config/opencms-system.xml these definitions:
<sites>
           <workplace-server>http://192.168.1.71:8080</workplace-server>
           <default-uri>/sites/default/</default-uri>
           <site server="http://empresa.zylk.net:8080" 
uri="/sites/default/"/>
                    <site server="http://prueba.zylk.net:8081" 
uri="/sites/default/"/>
       </sites>

Well, the question is that I can access to empresa.zylk.net, but when I 
try to access to prueba.zylk.net I get a 502 Proxy Error. *Could not 
connect to remote machine: Connection refused*




More information about the opencms-dev mailing list