【问题标题】:Need help configuring phabricator需要帮助配置 phabricator
【发布时间】:2014-07-26 20:31:10
【问题描述】:

我厌倦了用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 的配置?

感谢任何帮助。

【问题讨论】:

    标签: apache phabricator


    【解决方案1】:

    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
    

    【讨论】:

      【解决方案2】:

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

      重写引擎开启 RewriteRule ^/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 端口。

      【讨论】:

        猜你喜欢
        • 2011-07-23
        • 2020-07-09
        • 2021-10-18
        • 1970-01-01
        • 1970-01-01
        • 2018-04-12
        • 2015-05-05
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多