Author: nettings
Date: Tue Nov 13 13:36:23 2007
New Revision: 594650
URL: http://svn.apache.org/viewvc?rev=594650&view=rev
Log:
added patchfile to activate lenya proxies for default pub (for
convenience)
README updates.
Added:
lenya/trunk/tools/proxytest/activate_proxy.diff
Modified:
lenya/trunk/tools/proxytest/README
Modified: lenya/trunk/tools/proxytest/README
URL: http://svn.apache.org/viewvc/lenya/trunk/tools/proxytest/README?rev=594650&r1=594649&r2=594650&view=diff
==============================================================================
--- lenya/trunk/tools/proxytest/README (original)
+++ lenya/trunk/tools/proxytest/README Tue Nov 13 13:36:23 2007
@@ -3,6 +3,7 @@
If you want to play with Lenya in Jetty 6.1.6, please take a look at jetty6.xml
and follow the instructions in the comment header. In a nutshell:
+
$LENYA_HOME:> cd tools/jetty-6.1.6
$LENYA_HOME:> java -Djava.endorsed.dirs="../../externals/cocoon_2_1_x/lib/endorsed/" \
-jar start.jar ../proxytest/jetty6.xml
@@ -26,14 +27,18 @@
==================================
The proxy example setting simulates the following situation:
+
* A customer wants a company hostname and URLs without Lenya-specific
path components for the live site.
+
* The server uses name-based virtual hosting with just one IP, i.e.
there can only be one SSL vhost, which is shared among several
customers. This implies the need for sub-directories in the proxy
URL.
+
* "authoring" should be ssl-protected. There is no need for a
customer hostname here, since it's not publicly visible.
+
* Any SSL-protected documents in "live" can be handled by the SSL
vhost (not using the company hostname is ok in this case).
@@ -49,50 +54,57 @@
http://www.example.com/lenya/.
+
FIXME: The instructions below are currently Linux-specific.
Please contribute Windows and MacOS instructions!
+
First of all, start Jetty6 as described above.
Next get an Apache httpd server 2.2.x or later installed (your distro's
packages should be fine). Then apply the following tweaks:
1. Install the bogus SSL keys:
- cp *.pem /tmp (yes, /tmp. it's just for testing, no need to clutter up
- your apache ssl directory)
+ $LENYA_HOME/tools/proxytest:> cp *.pem /tmp
+
+ (yes, /tmp. it's just for testing, no need to clutter up your apache ssl
+ directory)
2. Install an apache configuration for virtual hosts:
- cp apache_vhosts.conf /etc/apache2/vhosts.d (or link it there)
+ $LENYA_HOME/tools/proxytest:> cp apache_vhosts.conf /etc/apache2/vhosts.d
- (That's probably distro-specific. Just make sure that the file is being
- included from your master config file)
+ (That's probably distro-specific. Just make sure that the file is being included
+ from your master config file)
3. Append some fake host entries to your local resolver:
- cat hosts_fake >> /etc/hosts
+ $LENYA_HOME/tools/proxytest:> cat hosts_fake >> /etc/hosts
4. Make sure apache2 is configured to run SSL by passing it the -DSSL flag.
5. Restart apache2:
- /etc/init.da/apache2 restart
+ $LENYA_HOME:> /etc/init.d/apache2 restart
+
+6. Uncomment the proxy settings in the default publication config
+ (src/pubs/default/config/publication.xml) and the global proxy settings
+ (src/modules-core/linking/config/cocoon-xconf/global-proxies.xconf).
+ You can use the patch provided in this directory:
-6. Uncomment the proxy settings in the default publication config:
- (src/pubs/default/config/publication.xml)
+ $LENYA_HOME:> patch -p0 < tools/proxytest/activate_proxy.diff
-7. Uncomment the global proxy settings.
- (src/modules-core/linking/config/cocoon-xconf/global-proxies.xconf)
+7. Build Lenya:
-8. ./build.sh clean && ./build.sh
+ $LENYA_HOME:> ./build.sh clean && ./build.sh
-9. Surf to http://localhost:8888/webapp to check what the proxy does (look
+8. Surf to http://localhost:8888/webapp to check what the proxy does (look
at the page source frequently). Then try
http://www.example.com/lenya/default/authoring/ (authoring) and
http://customer.example.com (live).
-10. Watch the logs in /tmp/LenyaTest_*.
+9. Watch the logs in /tmp/LenyaTest_*.
This should give you a working proxy setup.
Added: lenya/trunk/tools/proxytest/activate_proxy.diff
URL: http://svn.apache.org/viewvc/lenya/trunk/tools/proxytest/activate_proxy.diff?rev=594650&view=auto
==============================================================================
--- lenya/trunk/tools/proxytest/activate_proxy.diff (added)
+++ lenya/trunk/tools/proxytest/activate_proxy.diff Tue Nov 13 13:36:23 2007
@@ -0,0 +1,39 @@
+Index: src/pubs/default/config/publication.xml
+===================================================================
+--- src/pubs/default/config/publication.xml (revision 594644)
++++ src/pubs/default/config/publication.xml (working copy)
+@@ -128,7 +128,7 @@
+ The global proxy for non-publication-specific resources shall be
+ http://www.example.com/lenya.
+ -->
+-<!--
++
+ <proxy area="live" ssl="true" url="https://www.example.com/lenya/customer/live"/>
+ <proxy area="live" ssl="false" url="http://customer.example.com"/>
+ <proxy area="authoring" ssl="true" url="https://www.example.com/lenya/customer/authoring"/>
+@@ -137,7 +137,7 @@
+ <proxy area="archive" ssl="false" url="http://www.example.com/lenya/customer/archive"/>
+ <proxy area="trash" ssl="true" url="https://www.example.com/lenya/customer/trash"/>
+ <proxy area="trash" ssl="false" url="http://www.example.com/lenya/customer/trash"/>
+--->
++
+ </proxies>
+
+ </publication>
+Index: src/modules-core/linking/config/cocoon-xconf/globalproxies.xconf
+===================================================================
+--- src/modules-core/linking/config/cocoon-xconf/globalproxies.xconf (revision 594644)
++++ src/modules-core/linking/config/cocoon-xconf/globalproxies.xconf (working copy)
+@@ -31,10 +31,10 @@
+ <component logger="lenya.proxy"
+ role="org.apache.lenya.cms.linking.GlobalProxies"
+ class="org.apache.lenya.cms.linking.impl.GlobalProxiesImpl">
+-<!--
++
+ <proxy ssl="false" url="http://www.example.com/lenya"/>
+ <proxy ssl="true" url="https://www.example.com/lenya"/>
+--->
++
+ </component>
+
+ </xconf>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.