1

我厌倦了使用https://secure.phabricator.com/book/phabricator/article/configuration_guide/的说明配置 phabricator 我将主机名配置为包含一个点。我在那个描述中做了所有事情,但是如果我导航到我设置的主机名,我只会看到默认的 apache2 页面而不是 phabricator。我不确定我是否正确设置了 httpd.conf,因为我在我的系统上找不到 / -name httpd.conf。我根据以下信息在 /etc/apache2/sites-enabled/000-default.conf 进行了建议配置:

http://wiki.apache.org/httpd/DistrosDefaultLayout#Debian.2C_Ubuntu_.28Apache_httpd_2.x.29

当我重新启动 apache2ctl 时,它说很难确定服务器的域名。所以 /etc/hosts 可能是个问题,但由于我看到默认的 apache2,服务器已启动并正在运行。您是否需要放置一个特殊的 :port 来查看 phabricator 的配置?

任何帮助表示赞赏。

4

2 回答 2

2

1) 转到 /etc/apache2/sites-available。删除所有 *.conf 文件。

2)在这里创建phabricator.conf文件,内容如下:

<VirtualHost *>
    # Change this to the domain which points to your host.
    ServerName yourservername

    # Change this to the path where you put 'phabricator' when you checked it
    # out from GitHub when following the Installation Guide.
    #
    # Make sure you include "/webroot" at the end!
    DocumentRoot /path/to/phabricator/webroot

    RewriteEngine on
    RewriteRule ^/rsrc/(.*)     -                       [L,QSA]
    RewriteRule ^/favicon.ico   -                       [L,QSA]
    RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]

    <Directory "/path/to/phabricator/webroot">
            Require all granted
    </Directory>

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

3) 确保在 phabricator.conf 中输入正确的 phabricator 目录路径。

4) 转到 /etc/apache2/sites-enabled。删除所有符号链接。

5) 执行以下命令:

sudo a2ensite phabricator
sudo service apache2 restart
于 2014-08-26T11:39:55.923 回答
0

如果您仍然需要安装帮助,请更新此问题,我很乐意提供更多信息。我认为您需要在 httpd.conf 目录之后添加此内容:

RewriteRule 上的 RewriteEngine ^/rsrc/(. ) - [L,QSA] RewriteRule ^/favicon.ico - [L,QSA] RewriteRule ^(. )$ /index.php? 路径=$1 [B,L,QSA]

这可能会解决你的问题。还要确保(对于 Ubuntu)您的文档根目录和目录以“webroot”而不是 webroot/ 结尾。

-Apache 端口默认为 80,Mysql 端口默认为 3306。

VirtualHost *:80 上的端口是 Apache 的端口。您需要记住这一点,因为稍后您需要在 MySQL 配置页面上指定 MySQL 端口。

于 2014-08-25T07:20:52.063 回答