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

Paa*_*pan 4 apache phabricator server

我使用Apache/2.4.7来托管服务器.我正在主持phabricator.我们假设ip是xxxx,指向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>
Run Code Online (Sandbox Code Playgroud)

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

它引发了错误:

This request asked for "/" on host "placire.com", but no site is configured which can serve this request.
Run Code Online (Sandbox Code Playgroud)

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

谢谢.

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

PPS:另外,我很确定example.com正确指向xxxx,因为使用以下conf文件,当我在地址栏中输入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>
Run Code Online (Sandbox Code Playgroud)

Neh*_*ani 14

这个链接:https://secure.phabricator.com/T8717给了我一个提示,你可能需要设置config参数phabricator.base-uri.尝试:

 ./bin/config set phabricator.base-uri 'http://example.com/'
Run Code Online (Sandbox Code Playgroud)