[Zope] ProxyPass displaying HTML source

Jordi YC jordi_yc@lycos.es
Thu, 25 Jul 2002 11:18:21 -0400


I am trying to use Apache as the front-end using SSL. It seems that SSL 
is not an issue, but I am getting HTML source code instead.

As a test, I tried to use proxypass to zope.org and it worked.

I can lynx and the page will be displayed correctly on 
the server where apache and zope are hosted.

Any hint appreciated,


Browser screen http://somedomain.com/myzope/

Date: Thu, 25 Jul 2002 11:29:29 GMT
Connection: close
Content-Type: text/html
Content-Length: 2958

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<base href="" />

<title>Zope QuickStart</title>
<link rel="stylesheet" type="text/css" href="/manage_page_style.css">
<body bgcolor="#ffffff" link="#000099" alink="#000099" vlink="#000099">


### Section 1: Global Environment
ServerType standalone
# Do NOT add a slash at the end of the directory path.
ServerRoot "/var/www"
PidFile logs/httpd.pid
ScoreBoardFile logs/apache_runtime_status

#ResourceConfig conf/srm.conf
#AccessConfig conf/access.conf

Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

MinSpareServers 5
MaxSpareServers 10

StartServers 5
MaxClients 20 
MaxRequestsPerChild 30

LoadModule proxy_module /usr/lib/apache/modules/libproxy.so
#LoadModule rewrite_module    /usr/lib/apache/modules/mod_rewrite.so

### Section 2: 'Main' server configuration
Port 80

<IfDefine SSL>
Listen 80
Listen 443

User www
Group www

ServerAdmin root@somedomain.com 
ServerName somedomain.com 

DocumentRoot "/var/www/htdocs"

<Directory />
    Options FollowSymLinks
    AllowOverride None

<Directory "/var/www/htdocs">

    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all

UserDir disabled

DirectoryIndex index.html

AccessFileName .htaccess

<Files .htaccess>
    Order allow,deny
    Deny from all

UseCanonicalName On

TypesConfig conf/mime.types

DefaultType text/plain

<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
HostnameLookups Off

ErrorLog logs/error_log
LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

CustomLog logs/access_log common
ServerSignature Off
Alias /icons/ "/var/www/icons/"

<Directory "/var/www/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all

IndexOptions FancyIndexing

AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon /icons/unknown.gif

ReadmeName README
HeaderName HEADER

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

AddEncoding x-compress Z
AddEncoding x-gzip gz

AddLanguage en .en
AddLanguage es .es
AddLanguage ca .ca 

LanguagePriority en es ca

BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0

BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

# Allow server status reports, with the URL of http://servername/server-status
# Change the ".your_domain.com" to match your domain to enable.
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from somedomain.com 

# Allow remote server configuration reports, with the URL of
#  http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".your_domain.com" to match your domain to enable.
#<Location /server-info>
#    SetHandler server-info
#    Order deny,allow
#    Deny from all
#    Allow from .your_domain.com

##  SSL Global Context
##  All SSL configuration in this context applies both to
##  the main server and all SSL-enabled virtual hosts.

#   Some MIME-types for downloading Certificates and CRLs
<IfDefine SSL>
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl

<IfModule mod_ssl.c>

SSLPassPhraseDialog  builtin

SSLSessionCache         dbm:logs/ssl_scache
SSLSessionCacheTimeout  300

SSLMutex  file:logs/ssl_mutex

SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLRandomSeed startup file:/dev/arandom  512
SSLLog      logs/ssl_engine_log
SSLLogLevel info


<IfDefine SSL>

## SSL Virtual Host Context

<VirtualHost _default_:443>

#  General setup for the virtual host
#DocumentRoot /var/www/htdocs/manual
ServerName somedomain.com
ServerAdmin root@somedomain.com
ErrorLog logs/error_log
TransferLog logs/access_log
setEnv SERVER_URL http://somedomain.com 

ProxyPass /myzope/ 
ProxyPassReverse /myzope/

ProxyPass /lycos/ http://www.lycos.com/
ProxyPassReverse /lycos/ http://www.lycos.com/

#ProxyPass /
#ProxyPassReverse /

SSLEngine on
SSLCertificateFile    /etc/ssl/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key

CustomLog logs/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"