3

我的操作系统是 Ubuntu 13.10,我使用apt-get install. 目录/etc/apache2中没有httpd.conf配置Apache时使用的指令

请帮忙

4

3 回答 3

6

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:27:51.700 回答
0

您可能会阅读此文档,其中说明了不同版本和发行版的文件在哪里http://wiki.apache.org/httpd/DistrosDefaultLayout

还要记住,如果您有很多服务器,则需要配置 apache2/sites-availables/default.conf 中的服务器配置,如果您使用默认服务器,请更改它;如果没有,请根据 default.conf 创建一个新的。

如果您使用 apache 服务器介绍自己可能会很好,例如阅读http://httpd.apache.org/docs/2.4/en/getting-started.html

于 2014-06-18T15:12:21.560 回答
-1

updatedb

然后

locate httpd.conf
于 2014-03-08T21:55:06.103 回答