Fedora Core 4

This is an attempt to duplicate the problem documented on http://www.mkdoc.org.archived.website/bugs/stable/normal/perl-588/fc5/ on a FC4 machine that is connected to the internet and doesn't use Xen.

It has the default FC4 apache listening on port 80 which forwards requests to a compiled apache and mod_perl on port 81.

MKDoc Code

To start with the MKDoc code was updated:

[chris@devil ~]$ cd /var/mkdoc-1-6/
[chris@devil mkdoc-1-6]$ cvs -q up -dP
? Apache
? auto
? debug.diff
? dynamic_sitemap.diff
? init
? mail.part2.diff
? mkd_events_2.patch
? mkd_image_description.diff
? mkd_link_differentiation.diff
? perllocal.pod
? t
? usercsv-fix.patch
? MKDoc/Import
? MKDoc/Import.pm
? cgi/mkdoc.cgi.meminfo
cvs update: use `cvs add' to create an entry for conf/httpd.conf
? tools/mksetenv.sh

Env

The env is set on login so mksetenv.sh didn't need to be sourced:

[chris@devil mkdoc-1-6]$ printenv | grep MKD
MKDOC_DIR=/var/mkdoc-1-6

MySQL

Then two databases were created:

mysql> INSERT INTO user (Host, User, Password) VALUES ('localhost', 'test_1', password ('test_1'));
Query OK, 1 row affected (0.00 sec)

mysql> CREATE database test1_dev_webarch_net;
Query OK, 1 row affected (0.00 sec)

mysql> INSERT INTO db (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv,Drop_priv, Grant_priv, References_priv, Index_priv, Alter_priv) VALUES ('localhost', 'test1_dev_webarch_net', 'test_1', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
Query OK, 1 row affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
 
mysql> INSERT INTO user (Host, User, Password) VALUES ('localhost', 'test_2', password ('test_2'));
Query OK, 1 row affected (0.01 sec)
 
mysql> CREATE database test2_dev_webarch_net;
Query OK, 1 row affected (0.00 sec)

mysql> INSERT INTO db (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv,Drop_priv, Grant_priv, References_priv, Index_priv, Alter_priv) VALUES ('localhost', 'test2_dev_webarch_net', 'test_1', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
Query OK, 1 row affected (0.01 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

Site Installs

Two sites were installed:

[chris@devil mkdoc-1-6]$ tools/install-site.pl /var/mkdoc-sites/test1.dev.webarch.net/

Everything was left as the default apart fromt the database settings, this is the install for http://test1.dev.webarch.net/ :

1 - Database name      : test1_dev_webarch_net
2 - Database host      : (undefined)
3 - Database port      : (undefined)
4 - Database user      : test_1
5 - Database pass      : test_1

B - Go back to main menu
D - Delete an option

Input Choice:

1 - Basic MKDoc configuration
2 - Database connection
3 - Organization details
4 - First user details

S - Save Makefile.PL and exit
X - eXit without without saving

Input Choice: s
Checking config...  OK

Creating /var/mkdoc-sites/test1.dev.webarch.net
Creating /var/mkdoc-sites/test1.dev.webarch.net/su
Creating /var/mkdoc-sites/test1.dev.webarch.net/httpd
Creating /var/mkdoc-sites/test1.dev.webarch.net/resources
Creating /var/mkdoc-sites/test1.dev.webarch.net/resources/templates
Creating /var/mkdoc-sites/test1.dev.webarch.net/resources/skin
Creating /var/mkdoc-sites/test1.dev.webarch.net/data
Creating /var/mkdoc-sites/test1.dev.webarch.net/static
Creating /var/mkdoc-sites/test1.dev.webarch.net/static/files
Creating /var/mkdoc-sites/test1.dev.webarch.net/static/images
Creating /var/mkdoc-sites/test1.dev.webarch.net/log
Creating /var/mkdoc-sites/test1.dev.webarch.net/cache
 
Writing apache config files

Your mkdoc site has been installed. You should now restart
your http server. Once this is done, go to the following
address:

  http://users.test1.dev.webarch.net/

Your default connection parameters will be:

  user: admin
  password: XXX

And this is the install for http://test2.dev.webarch.net/ :

[chris@devil mkdoc-1-6]$ tools/install-site.pl /var/mkdoc-sites/test2.dev.webarch.net
1 - Database name      : test2_dev_webarch_net
2 - Database host      : (undefined)
3 - Database port      : (undefined)
4 - Database user      : test_2
5 - Database pass      : test_2

B - Go back to main menu
D - Delete an option

Input Choice:

1 - Basic MKDoc configuration
2 - Database connection
3 - Organization details
4 - First user details

S - Save Makefile.PL and exit
X - eXit without without saving

Input Choice: s
Checking config...  OK

Creating /var/mkdoc-sites/test2.dev.webarch.net
Creating /var/mkdoc-sites/test2.dev.webarch.net/su
Creating /var/mkdoc-sites/test2.dev.webarch.net/httpd
Creating /var/mkdoc-sites/test2.dev.webarch.net/resources
Creating /var/mkdoc-sites/test2.dev.webarch.net/resources/templates
Creating /var/mkdoc-sites/test2.dev.webarch.net/resources/skin
Creating /var/mkdoc-sites/test2.dev.webarch.net/data
Creating /var/mkdoc-sites/test2.dev.webarch.net/static
Creating /var/mkdoc-sites/test2.dev.webarch.net/static/files
Creating /var/mkdoc-sites/test2.dev.webarch.net/static/images
Creating /var/mkdoc-sites/test2.dev.webarch.net/log
Creating /var/mkdoc-sites/test2.dev.webarch.net/cache

Writing apache config files

Your mkdoc site has been installed. You should now restart
your http server. Once this is done, go to the following
address:

  http://users.test2.dev.webarch.net/

Your default connection parameters will be:

  user: admin
  password: XXX

The the following changes were made to the apache 1.3 config, in /var/mkdoc-sites/test1.dev.webarch.net/httpd/httpd.conf this was added:

<VirtualHost *>
  ServerName            test1.dev.webarch.net
  Redirect    /         http://www.test1.dev.webarch.net/
</VirtualHost>

Add :81 was added to each VirtualHost because this server listens on port 81 and Apache 2.0 acts as a reverse proxy on port 80.

:1,$s/\*/\*:81/gc

The /var/mkdoc-sites/test1.dev.webarch.net/httpd/httpd-env.conf was edited and the following was added to the end to strip the :81 from the URIs:

SetEnv MKD__URL_PORT_STRIP  "81"

The same was done for /var/mkdoc-sites/test2.dev.webarch.net/httpd/httpd.conf and /var/mkdoc-sites/test2.dev.webarch.net/httpd/httpd-env.conf

Then apache 1.3 was stopped and started again.

Apache 2.x

Then the following was added to the Apache 2.x configuration and this apache was restarted:

<VirtualHost *:80>
 ServerName            www.test1.dev.webarch.net
 ServerAlias           test1.dev.webarch.net
 ServerAlias           users.test1.dev.webarch.net
 ServerAdmin           admin@test1.dev.webarch.net
 RewriteEngine On
 RewriteCond %{HTTP_HOST} ^users\.
 RewriteRule /?(.*) http://users.test1.dev.webarch.net:81/$1 [P,L]
 RewriteCond %{HTTP_HOST} ^www\.
 RewriteRule /?(.*) http://www.test1.dev.webarch.net:81/$1 [P,L]
 RewriteRule /?(.*) http://www.test1.dev.webarch.net/$1 [R=permanent,L]
 # Include conf/deflate.conf
</Virtualhost>

<VirtualHost *:80>
 ServerName            www.test2.dev.webarch.net
 ServerAlias           test2.dev.webarch.net
 ServerAlias           users.test2.dev.webarch.net
 ServerAdmin           admin@test2.dev.webarch.net
 RewriteEngine On
 RewriteCond %{HTTP_HOST} ^users\.
 RewriteRule /?(.*) http://users.test2.dev.webarch.net:81/$1 [P,L]
 RewriteCond %{HTTP_HOST} ^www\.
 RewriteRule /?(.*) http://www.test2.dev.webarch.net:81/$1 [P,L]
 RewriteRule /?(.*) http://www.test2.dev.webarch.net/$1 [R=permanent,L]
 # Include conf/deflate.conf
</Virtualhost>

Then the following was added to /etc/hosts to make things work…

# test1
127.0.0.1            www.test1.dev.webarch.net
127.0.0.1            test1.dev.webarch.net
127.0.0.1            users.test1.dev.webarch.net
# test2
127.0.0.1            www.test2.dev.webarch.net
127.0.0.1            test2.dev.webarch.net
127.0.0.1            users.test2.dev.webarch.net

Document Creation

On the first site, http://users.test1.dev.webarch.net/ a new document was created:

Title:       News
Description: News
Keywords:    News

Then on the second site, http://users.test2.dev.webarch.net/ the same thing was done.

No content was added to this, and starting at the home page another document was created on both sites:

Title:       Test
Description: Test
Keywords:    Test

Then a Link Component was added to the /test/ document on both sites:

Address (URI): /news/
Title:         News
Description:   News

And there were no internal server errors…

DB content

This is what was in the database:

mysql> use test1_dev_webarch_net;
Database changed
mysql> select Body from Document where Full_Path="/test/";
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Body                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|<block id="flo_block_1" type="link">
<hash id="181174048" bless="flo::editor::Link">
    <item key="internal_link">
        <hash id="181117980">
            <item key="file_name">
                <litteral undef="true" />
            </item>
            <item key="fragment">
                <litteral undef="true" />
            </item>
            <item key="query">
                <litteral undef="true" />
            </item>
            <item key="document_id">
                <litteral>2</litteral>
            </item>
            <item key="scheme">
                <litteral>http</litteral>
            </item>
            <item key="operation">
                <litteral undef="true" />
            </item>
            <item key="is_internal">
                <litteral>1</litteral>
            </item>
            <item key="authority">
                <litteral>www.test1.dev.webarch.net</litteral>
            </item>
        </hash>
    </item>
    <item key="url">
        <litteral>http://www.test1.dev.webarch.net/news/</litteral>
    </item>
    <item key="title">
        <litteral>News</litteral>
    </item>
    <item key="description">
        <litteral>News</litteral>
    </item>
    <item key="uri_name">
        <litteral>news.link</litteral>
    </item>
</hash>

</block> |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql>

And this looks exactly the same as the content on the other test server: http://www.mkdoc.org.archived.website/bugs/stable/normal/internal-link/server-error-1/

Perl Modules

This machine has the following perl modules installed:

This document was last modified on 2006-06-19 07:26:30.
MKDoc Ltd., 31 Psalter Lane, Sheffield, S11 8YL, UK.
Copyright © 2001-2006 MKDoc Ltd.