Apache Frontend: Change 'zope=true' option to 'type=zope'

parent 5e631d74
...@@ -111,7 +111,7 @@ class Recipe(BaseSlapRecipe): ...@@ -111,7 +111,7 @@ class Recipe(BaseSlapRecipe):
# rule structure. # rule structure.
# So we will have one RewriteMap for normal websites, and one # So we will have one RewriteMap for normal websites, and one
# RewriteMap for Zope Virtual Host Monster websites. # RewriteMap for Zope Virtual Host Monster websites.
if slave_instance.get("zope", "").upper() in ('1', 'TRUE'): if slave_instance.get("type", "").lower() in ('zope'):
rewrite_rule_zope_list.append(rewrite_rule) rewrite_rule_zope_list.append(rewrite_rule)
else: else:
rewrite_rule_list.append(rewrite_rule) rewrite_rule_list.append(rewrite_rule)
......
...@@ -13,17 +13,17 @@ How to use ...@@ -13,17 +13,17 @@ How to use
========== ==========
First, you will need to request a "master" instance of Apache Frontend with First, you will need to request a "master" instance of Apache Frontend with
"domain" parameter, like : "domain" parameter, like::
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<instance> <instance>
<parameter id="domain">moulefrite.com</parameter> <parameter id="domain">moulefrite.org</parameter>
<parameter id="port">443</parameter> <parameter id="port">443</parameter>
</instance> </instance>
Then, it is possible to request many slave instances Then, it is possible to request many slave instances
(currently only from slapconsole, UI doesn't work yet) (currently only from slapconsole, UI doesn't work yet)
of Apache Frontend, like : of Apache Frontend, like::
instance = request( instance = request(
software_release=apache_frontend, software_release=apache_frontend,
partition_reference='frontend2', partition_reference='frontend2',
shared=True, shared=True,
...@@ -33,8 +33,8 @@ Those slave instances will be redirected to the "master" instance, ...@@ -33,8 +33,8 @@ Those slave instances will be redirected to the "master" instance,
and you will see on the "master" instance the associated RewriteRules of and you will see on the "master" instance the associated RewriteRules of
all slave instances. all slave instances.
Finally, the slave instance will be accessible from : Finally, the slave instance will be accessible from:
https://someidentifier.moulefrite.com. https://someidentifier.moulefrite.org.
Instance Parameters Instance Parameters
=================== ===================
...@@ -44,10 +44,12 @@ Master Instance Parameters ...@@ -44,10 +44,12 @@ Master Instance Parameters
domain domain
~~~~~~ ~~~~~~
name of the domain to be used (example: mydomain.com). Subdomains of this domain will be used for the slave instances (example: instance12345.mydomain.com). It is then recommended to add a wildcard in DNS for the subdomains of the chosen domain like:: name of the domain to be used (example: mydomain.com). Subdomains of this
domain will be used for the slave instances (example:
instance12345.mydomain.com). It is then recommended to add a wildcard in DNS
for the subdomains of the chosen domain like::
*.mydomain.com. IN A 123.123.123.123 *.mydomain.com. IN A 123.123.123.123
Using the IP given by the Master Instance. Using the IP given by the Master Instance.
"domain" is a mandatory Parameter. "domain" is a mandatory Parameter.
port port
...@@ -62,24 +64,44 @@ url ...@@ -62,24 +64,44 @@ url
~~~ ~~~
url of backend to use. url of backend to use.
"url" is a mandatory parameter. "url" is a mandatory parameter.
Example : http://mybackend.com/myresource Example: http://mybackend.com/myresource
cache cache
~~~~~ ~~~~~
Specify if slave instance should use a varnish / stunnel to connect to backend. Specify if slave instance should use a varnish / stunnel to connect to backend.
Possible values : "true", "false". Possible values: "true", "false".
"cache" is an optional parameter. Defaults to "false". "cache" is an optional parameter. Defaults to "false".
Example : true Example: true
zope type
~~~~ ~~~~
Specify if slave instance will redirect to a zope backend. If specified, Apache RewriteRule will use Zope's Virtual Host Daemon. Specify if slave instance will redirect to a zope backend. If specified, Apache
Possible values : "true", "false". RewriteRule will use Zope's Virtual Host Daemon.
"zope" is an optional parameter. Defaults to "false". Possible values: "zope", "default".
Example : true "type" is an optional parameter. Defaults to "default".
Example: zope
custom_domain custom_domain
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
Domain name to use as frontend. The frontend will be accessible from this domain. Domain name to use as frontend. The frontend will be accessible from this domain.
"custom_domain" is an optional parameter. Defaults to [instancereference].[masterdomain]. "custom_domain" is an optional parameter. Defaults to
Example : www.mycustomdomain.com [instancereference].[masterdomain].
Example: www.mycustomdomain.com
Advanced example
================
Request slave frontend instance using a Zope backend, with Varnish activated,
listening to a custom domain::
instance = request(
software_release=apache_frontend,
partition_reference='frontend2',
shared=True,
partition_parameter_kw={
"url":"https://[1:2:3:4]:1234/someresource",
"cache":"true",
"type":"zope",
"custom_domain":"mycustomdomain.com",
}
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment