[opencms-dev] Open CMS Vhost.

michael at iqworks.co.nz michael at iqworks.co.nz
Mon Aug 8 02:46:16 CEST 2005


I have follow the instructions here.

http://cms2.graysail.com/alkacon-documentation/howto-multisite/multisite.html

However I haven't been able to get this to work for me.

I get the following in /var/log/httpd/error.log 
-----------------------------------------------------------------------------------------------------
[Mon Aug 08 12:18:58 2005] [error] [client 192.168.0.25] client denied by 
server configuration: proxy:http://127.0.0.1:8082/opencms/
-----------------------------------------------------------------------------------------------------

It would seem like I'm missing something very very simple. 


Any help or a kick in the right direction would be appreciated.


Here is my changes to server.xml
{$TOMCAT_HOME}/conf/server.xml
-----------------------------------------------------------------------------------------------------


<!-- This is working open CMS is up and running here you can get in and use it 
-->	
<Connector port="8080" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />
    <!-- Note : To disable connection timeouts, set connectionTimeout value
     to 0 -->

	<!-- Added By Me -->	
	
<Connector port="8081" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               proxyName="www.iqworks.co.nz" proxyPort="80"
               debug="0" connectionTimeout="20000"
               disableUploadTimeout="true" />
<Connector port="8082" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               proxyName="www.menumate.co.nz" proxyPort="80"
               debug="0" connectionTimeout="20000"
               disableUploadTimeout="true" />
<Connector port="8083" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               proxyName="www.menumate.com" proxyPort="80"
               debug="0" connectionTimeout="20000"
               disableUploadTimeout="true" />     
<Connector port="8084" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               proxyName="www.gregor.co.nz" proxyPort="80"
               debug="0" connectionTimeout="20000"
               disableUploadTimeout="true" />

-----------------------------------------------------------------------------------------------------


Here is the Vhosts.conf
/etc/httpd/2.0/conf/vhosts/Vhosts.conf
I not sure if the Document root is correct I would have thought it should be
/usr/local/tomcat/webapps/opencms but I have tried both and nither work...

As you can see I'm VHosting (well trying to ) a bunch of domain names.

-----------------------------------------------------------------------------------------------------
<VirtualHost *>
    ServerName www.menumate.com     
    ServerAdmin michael at menumate.com
    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/menumate-com-access.log common env=!redirect
    

    ProxyPass         /opencms/                 !
    RedirectPermanent /opencms/                 http://www.menumate.com/                      
    
                       

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

<VirtualHost *>
    ServerName www.menumate.co.nz
    ServerAdmin michael at menumate.co.nz
    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/menumate-co-access.log common env=!redirect
    

    ProxyPass         /opencms/   !
    RedirectPermanent /opencms/                 http://www.menumate.co.nz/        
    
                          

    ProxyPass         /resources/               !
    ProxyPass         /export/                  !

    ProxyPass         /                         http://8083/opencms/
    ProxyPassReverse  /                         http://127.0.0.1:8083/opencms/
</VirtualHost>

NameVirtualHost gregor.co.nz
<VirtualHost gregor.co.nz>
    ServerName www.gregor.co.nz
    ServerAdmin michael at gregor.co.nz
    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/gregor-access.log common env=!redirect
    

    ProxyPass         /opencms/   !
    RedirectPermanent /opencms/                 http://www.gregor.co.nz/        
                            
    ProxyPass         /resources/               !
    ProxyPass         /export/                  !

    ProxyPass         /                         http://127.0.0.1:8084/opencms/
    ProxyPassReverse  /                         http://127.0.0.1:8084/opencms/
</VirtualHost>
 
<VirtualHost *>
    ServerName www.iqworks.co.nz
    ServerAdmin webmaster at iqworks.co.nz
    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/iqworks-access.log common env=!redirect

    ProxyPass         /opencms/                 !
    RedirectPermanent /opencms/                 http://www.iqworks.co.nz/

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

-----------------------------------------------------------------------------------------------------

Configuring OpenCms

This File doesn't exist in my system.

{$TOMCAT_HOME}/webapps/ROOT/WEB-INF/config/opencms-system.xml 

However I found it here...
/usr/local/tomcat/webapps/opencms/WEB-INF/config/opencms-system.xml

Added my sites.
-----------------------------------------------------------------------------------------------------
		<sites>
			<workplace-server>http://localhost:8080</workplace-server>
			<default-uri>/sites/default/</default-uri>
			<site server="http://localhost:8080" uri="/sites/default/"/>
			<site server="http://www.iqworks.co.nz" uri="/sites/MenuMate/"/>	
			<site server="http://www.menumate.com" uri="/sites/MenuMate/"/>		
			<site server="http://www.menumate.co.nz" uri="/sites/MenuMate/"/>	
			<site server="http://www.gregor.co.nz" uri="/sites/Gregor_Electrical/"/>			
		</sites>
-----------------------------------------------------------------------------------------------------

Adjusted Httpd2.conf file as follows, added the <IfModule mod_proxy.c> section 
after a bit of googling. Still didnt work even after 'Allow from all'

-----------------------------------------------------------------------------------------------------
LoadModule proxy_module		modules/mod_proxy.so

<IfModule mod_proxy.c>
   ProxyRequests On
   <Directory proxy:*>
      Order deny,allow
      Deny from all
      Allow from all
   </Directory>
   ProxyVia Full
</IfModule>

-----------------------------------------------------------------------------------------------------


My System version Info...
-----------------------------------------------------------------------------------------------------
Apache-AdvancedExtranetServer/2.0.53 (Mandrakelinux/PREFORK-9mdk) PHP/4.3.10 
proxy_html/2.4 mod_jk/1.2.14 mod_perl/1.999.21 Perl/v5.8.6!

jakarta-tomcat-5.5.9
-----------------------------------------------------------------------------------------------------
     
     



More information about the opencms-dev mailing list