首页 文章

使用phabricator虚拟主机创建新的虚拟主机

提问于
浏览
1

我在站点中有一个虚拟主机(etc / apache2 / sites-available / phabricator.conf)

Alias /phabricator/ /var/www/phabricator/phabricator/webroot/
<VirtualHost *:80>`
ServerName test.net
DocumentRoot /var/www/phabricator/phabricator/webroot
RewriteEngine on
RewriteRule ^/rsrc/(.*)     -                       [L,QSA]
RewriteRule ^/favicon.ico   -                       [L,QSA]
RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]

<Directory "/var/www/phabricator/phabricator/webroot">
  Options Indexes FollowSymLinks
  Order allow,deny
  Allow from all
</Directory>

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

当我输入url test.net时,我被重定向到phabricator页面

我想添加一个新的虚拟主机指向playframework应用程序站点-available / default-ssl我认为不是一个好文件,但每个地方都是同一个问题:

<VirtualHost *:8080>
   ProxyPreserveHost On
   ServerName tets.net
   ProxyPass  /excluded !
   ProxyPass /test2 http://127.0.0.1:9000/
  ProxyPassReverse /test2 http://127.0.0.1:9000/
</VirtualHost>

但第二个虚拟主机永远不会工作我有这个错误:无法检索请求的URL . 在root上我到达phabricator上所有其他url没有任何工作

1 回答

  • 0

    Always Match Slashes when using ProxyPass

    确保可以访问127.0.0.1:9000,一旦正确定义了proxypass指令,匹配源和目标中的斜杠 . 也就是说,如果源是目录,则目标必须是目录,如果源是文件,目标必须是文件,目录以/结尾,在这种情况下,因为 http://127.0.0.1:9000 是正确生成的proxypass指令的目录:

    ProxyPass /test2/ http://127.0.0.1:9000/
    ProxyPassReverse /test2/ http://127.0.0.1:9000/
    

相关问题