简体   繁体   English

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

[英]Create a new virtualhost with phabricator virtualhost

I have one virtualhost in site available (etc/apache2/sites-available/phabricator.conf) 我在站点中有一个虚拟主机(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>

when i type in url test.net i am redirected on phabricator page 当我输入url test.net时,我被重定向到phabricator页面

i want add a new virtualhost to point on playframework application sites-available/default-ssl i think not a good file but every where is same problem : 我想添加一个新的虚拟主机指向playframework应用程序站点 - 可用/ 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>

but the second virtual host never work i have this error : The requested URL could not be retrieved. 但第二个虚拟主机永远不会工作我有这个错误:无法检索请求的URL。 on root i arrive on phabricator on all other url nothing working 在root上我到达phabricator上所有其他url没有任何工作

Always Match Slashes when using ProxyPass 使用ProxyPass时始终匹配斜杠

Make sure 127.0.0.1:9000 is reachable, once you do, define your proxypass directives correctly, matching slashes in the source and the target. 确保可以访问127.0.0.1:9000,一旦正确定义了proxypass指令,匹配源和目标中的斜杠。 That is, if the source is a directory, the target must be a directory, if the source is a file the target must be a file, directories end with /, in this case since http://127.0.0.1:9000 is a directory the correct resulting proxypass directive looks like: 也就是说,如果源是目录,则目标必须是目录,如果源是文件,目标必须是文件,目录以/结尾,在这种情况下,因为http://127.0.0.1:9000是目录正确的结果proxypass指令如下所示:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM