在 Debian 上使用 apache2 安装 Textpattern CMS

在 Debian 上使用 apache2 安装 Textpattern CMS

我在 apache2 服务器上配置了 Vhost:

<VirtualHost *:80>
        ServerAdmin [email protected]
        ServerName www.asr.lan
        DocumentRoot /home/web/
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /home/web/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

在 /home/web 目录中,我解压后复制了 textpattern-4.5.7。在浏览器中输入地址:www.asr.lan/textpattern-4.5.7,得到的错误如下:

$value) { if (!in_array($_txpfoo, array( 'GLOBALS', '_SERVER', '_GET', '_POST', '_FILES', '_COOKIE', '_SESSION', '_REQUEST', '_ENV', ))) { unset($GLOBALS[$_txpfoo], $$_txpfoo); } } } define("txpinterface", "public"); if (!defined('txpath')) { define("txpath", dirname(__FILE__).'/textpattern'); } // save server path to site root if (!isset($here)) { $here = dirname(__FILE__); } // pull in config unless configuration data has already been provided (multi-headed use). if (!isset($txpcfg['table_prefix'])) { // Use buffering to ensure bogus whitespace in config.php is ignored ob_start(NULL, 2048); include txpath.'/config.php'; ob_end_clean(); } include txpath.'/lib/constants.php'; include txpath.'/lib/txplib_misc.php'; if (!isset($txpcfg['table_prefix'])) { txp_status_header('503 Service Unavailable'); exit('config.php is missing or corrupt. To install Textpattern, visit textpattern/setup/'); } // custom caches et cetera? if (isset($txpcfg['pre_publish_script'])) { require $txpcfg['pre_publish_script']; } include txpath.'/publish.php'; textpattern(); ?> 

当我打开时www.asr.lan/textpattern-4.5.7/setup出现此错误:

Not Found

The requested URL /textpattern-4.5.7/setup was not found on this server.
Apache/2.2.22 (Debian) Server at www.asr.lan Port 80

我如何设置文本模式?

答案1

您尚未安装 php。

跑步:

apt-get 安装 php5 libapache2-mod-php

服务 apache2 重启

相关内容