This topic contains reference information and configuration files for examples in Enfold Proxy (EP). See also Caching Headers and Enfold Proxy Reference Guide.

Customizing Error Messages

Typical website error messages (such as "Page not found") are handled by your Plone site and Enfold Proxy (EP) just passes them along to the user.

The only error messages that EP itself generates occur when it has problems contacting your Plone site. You may want to customize these error messages to direct users to your technical support, or to match your web site's branding.

The error message files are located in the 'errors' directory in the application's directory. They are named according to the matching HTTP status code.

Filename HTTP Status Occurs when
403.html 403 Forbidden A remote administration command is received from an unauthorized machine.
403.license.html 403 Forbidden Your Enfold Systems license was not found, or is invalid.
500.html 500 Internal Server Error Any error is encountered, other than those specified below
502.html 502 Bad Gateway The proxied website was contacted, but the communication did not complete as expected.
504.html 504 Gateway Timeout The proxied website could not be contacted at all, or it did not respond in time.

These files are mostly plain HTML which you can customize as you see fit. However, you can also include special strings will be replaced with more details about the error.

String Will be replaced with
%(errnum)s The internal error number.
%(msg)s The internal error message.
%(func)s When available, the part of the program that generated the error.

XSLT Examples

Sample XML File/Script

This is a small python script that outputs an XML file within Plone. It is used in the xslt caching example Create a python script in the python and paste the following into the body:

request = container.REQUEST
response = request.RESPONSE
       container.absolute_url() + '/cdcatalog.xsl')
response.setHeader('Content-Type', 'text/xml')

print """<?xml version="1.0" encoding="ISO-8859-1"?>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>

<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<company>CBS Records</company>

<title>Greatest Hits</title>
<artist>Dolly Parton</artist>



return printed

Sample XSLT File (for XSLT Caching Example

Here is a sample XSLT file for the XSLT caching example:

<?xml version="1.0" encoding="ISO-8859-1"?>
 <xsl:stylesheet version="1.0"
 <xsl:output method="html" version="1.0"
    encoding="UTF-8" indent="yes"/>
  <xsl:template match="/">
    <h2>My CD Collection</h2>
      <table border="1">
        <tr bgcolor="#9acd32">
          <th align="left">Title</th>
          <th align="left">Artist</th>
        <xsl:for-each select="catalog/cd">
          <td><xsl:value-of select="title"/></td>
          <td><xsl:value-of select="artist"/></td>

Sample eep.ini file

Here is the eep.ini which was used for most of the examples. Note that you can check the syntax of your own eep.ini file by running EP's check utility.

[cache log]
eventlog_level = ERROR
level = INFO

[proxy log]
level = ERROR
eventlog_level = ERROR
backup_count = 5


cache_default_age = 6000
cache_enabled = True
object_cache_enabled = True
object_cache_max_len = 120

[host originalfunsite]
site = 998577302
excludes = java_application
auto_excludes = fsdirs
xslt_enabled = True
[host funsite1]
vh_root = /Plone2
host_headers =
site = 1180700441
vh_hosts = localhost:8080 localhost:8100

[host adminfunsite]
vh_root = /
site = 652515656
host_headers =
rewrite_mode = vhm

[host testidiot]
vh_hosts =
rewrite_mode = simple
site = 1133314930
vh_root = /
lh_root = /python