该请求要求" /"在主机" example.com"上,但没有配置可以提供此请求的站点

时间:2016-02-25 13:04:04

标签: apache server phabricator

我使用Apache / 2.4.7来托管服务器。我正在主持phabricator。 我们假设ip是x.x.x.x,指向ip的域名是example.com。

以下是

的内容
  

/etc/apache2/sites-enabled/000-default.conf

<VirtualHost *:80>
         ServerName http://x.x.x.x/
         DocumentRoot /home/ubuntu/phabricator/phabricator/webroot
         RewriteEngine on
         RewriteRule ^/rsrc/(.*)     -                       [L,QSA]
         RewriteRule ^/favicon.ico   -                       [L,QSA]
         RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]
        <Directory /home/ubuntu/phabricator/phabricator/webroot>
                Options Indexes FollowSymLinks Includes ExecCGI
                AllowOverride None
                Require all granted
        </Directory>
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>


<VirtualHost *:80>
         ServerName http://example.com
         ServerAlias www.example.com
         DocumentRoot /home/ubuntu/phabricator/phabricator/webroot
         RewriteEngine on
         RewriteRule ^/rsrc/(.*)     -                       [L,QSA]
         RewriteRule ^/favicon.ico   -                       [L,QSA]
         RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]


        <Directory /home/ubuntu/phabricator/phabricator/webroot>
                Options Indexes FollowSymLinks Includes ExecCGI
                AllowOverride None
                Require all granted
        </Directory>

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

所以,如果我在浏览器的地址栏中输入ip,即x.x.x.x,phabricator就会很好用。但相反,如果我使用域名:example.com,

它引发了错误:

This request asked for "/" on host "placire.com", but no site is configured which can serve this request.

我犯了什么错误?我如何继续解决它?

谢谢。

PS:我使用了以下指南来配置Phabricator: https://secure.phabricator.com/book/phabricator/article/configuration_guide/

PPS:另外,我非常确定example.com正确指向x.x.x.x,因为使用以下配置文件,当我在地址栏中输入example.com时,我看到了apache默认页面:

<VirtualHost *:80>
         ServerName http://x.x.x.x
         DocumentRoot /home/ubuntu/phabricator/phabricator/webroot
         RewriteEngine on
         RewriteRule ^/rsrc/(.*)     -                       [L,QSA]
         RewriteRule ^/favicon.ico   -                       [L,QSA]
         RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]

        <Directory /home/ubuntu/phabricator/phabricator/webroot>
                Options Indexes FollowSymLinks Includes ExecCGI
                AllowOverride None
                Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
         ServerName example.com
         DocumentRoot /var/www/html/

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

1 个答案:

答案 0 :(得分:14)

此链接:https://secure.phabricator.com/T8717向我提示您可能需要设置angular.forEach(values, function(value, key) { console.log(key + ': ' + value); // I know I need to loop inside of each object I beleieve }); 参数config。尝试:

phabricator.base-uri