此请求请求主机 "example.com" 上的“/”,但没有配置可满足此请求的站点
This request asked for "/" on host "example.com", but no site is configured which can serve this request
我正在使用 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__= [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__= [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 因为使用以下 conf 文件,当我在地址栏我看到了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__= [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>
这个 link: https://secure.phabricator.com/T8717 提示我您可能需要设置 config
参数 phabricator.base-uri
。尝试:
./bin/config set phabricator.base-uri 'http://example.com/'
我正在使用 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__= [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__= [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 因为使用以下 conf 文件,当我在地址栏我看到了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__= [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>
这个 link: https://secure.phabricator.com/T8717 提示我您可能需要设置 config
参数 phabricator.base-uri
。尝试:
./bin/config set phabricator.base-uri 'http://example.com/'