13

我正在从源代码安装 Koha。通用 unix 方向指示 sudo make install 之后的以下步骤

sudo ln -s /etc/koha/koha-httpd.conf /etc/apache2/sites-available/koha

嗯?

我的 apache2 目录不包含可用站点,只有 /private/etc/apache2/extra /private/etc/apache2/httpd.conf /private/etc/apache2/magic /private/etc/apache2/mime.types /private/etc /apache2/original /private/etc/apache2/other /private/etc/apache2/users

我应该能够浏览到http://servername:8080/运行 Koha,我在 koha-httpd.conf 中指定了“服务器名称”,如下所示:

## Intranet
<VirtualHost 192.168.1.4:8080>
   ServerAdmin webmaster@local
   DocumentRoot /usr/share/koha/intranet/htdocs
   ServerName John-Breedloves-Mac-mini.local:8080
#  ServerAlias intranet.mydomain.com
   ScriptAlias /cgi-bin/koha/ "/usr/share/koha/intranet/cgi-bin/"
   ScriptAlias /index.html "/usr/share/koha/intranet/cgi-bin/mainpage.pl"
   ScriptAlias /search "/usr/share/koha/intranet/cgi-bin/search.pl"
   ErrorLog /var/log/koha/koha-error_log
#  TransferLog /var/log/koha/koha-access_log
   SetEnv KOHA_CONF "/etc/koha/koha-conf.xml"
   SetEnv PERL5LIB "/usr/share/koha/lib"
   Options +FollowSymLinks

   ErrorDocument 400 /cgi-bin/koha/errors/400.pl
   ErrorDocument 401 /cgi-bin/koha/errors/401.pl
   ErrorDocument 403 /cgi-bin/koha/errors/403.pl
   ErrorDocument 404 /cgi-bin/koha/errors/404.pl
   ErrorDocument 500 /cgi-bin/koha/errors/500.pl

   RewriteEngine On 

但是,当我去时http://john-breedloves-mac-mini.local:8080/,我得到:

有用!

这就像讽刺或什么的。

帮助一个菜鸟。

4

5 回答 5

13

看起来/private/etc/apache2/other/将是大致对应的文件夹。/etc/apache2/httpd.conf包含一个包含该文件夹中所有文件的指令Include /private/etc/apache2/other/*.conf,很像 Apache 的 Linux 安装中常见的 sites-available 文件夹。

于 2010-01-22T23:13:00.197 回答
5

Runapachectl -S的简写形式apachectl -t -D DUMP_VHOSTS

根据 apachectl man 文件,这将显示已解析的设置(目前只有 vhost 设置)。顺便说一句,它还会检查您的配置文件是否有错误。

于 2014-08-27T01:08:30.540 回答
2

安德鲁的回答是正确的。在我的安装中,我还必须更改

Order allow,deny
Deny from all

Order allow,deny
Allow from all

在 /etc/apache2/httpd.conf 中。

您在 :8080 获得服务器的事实表明您可能正在运行与基本系统安装不同的 apache 配置,例如MAMP;我不相信 apache 默认会监听:8080。

于 2011-09-01T15:57:06.757 回答
1

我也有这个问题。这似乎是因为安装在 osx 上的 apache 的默认版本覆盖了其他版本。要禁用它,请转到“系统偏好设置>共享”并取消选中“网络共享”。

祝你好运!

于 2010-06-29T13:56:08.793 回答
0

请注意,ServerRoot 指定子目录 conf 和 logs 的位置。

在我的 httpd.conf 中,它设置为 /usr

于 2013-05-08T15:44:51.440 回答