Apache Alias设置so / rt默认为特定位置,更喜欢rt.example.com?

时间:2014-07-21 13:15:01

标签: apache vhosts

如何在/rt

上将别名rt.example.com更改为子域apache

目前我在debian上设置了virtualhsot,在我的所有网站上如果你转到mysite.com/r它会转到请求跟踪器。

我想将其设置为在单个子域rt.synergysystems.co.za

上工作

当前Vhost配置:

AddDefaultCharset UTF-8

PerlSetEnv RT_SITE_CONFIG /etc/request-tracker4/RT_SiteConfig.pm

Alias /rt /usr/share/request-tracker4/html

<Location /rt>
  SetHandler modperl
  PerlResponseHandler Plack::Handler::Apache2
  PerlSetVar psgi_app /usr/share/request-tracker4/libexec/rt-server
</Location>

<Location /rt/REST/1.0/NoAuth>
    Order Allow,Deny
    Allow from 127.0.0.1
</Location>

<Perl>
  use Plack::Handler::Apache2;
  Plack::Handler::Apache2->preload("/usr/share/request-tracker4/libexec/rt-server");
</Perl>

1 个答案:

答案 0 :(得分:0)

alias /rt表示apache /rt上与document root的别名。

您需要做的就是设置标准VirtualhostServerNameDocumentRootDirectory,如下所示:

<VirtualHost *:80>
ServerName rt.mysite.co.za
AddDefaultCharset UTF-8
DocumentRoot "/usr/share/request-tracker4/html"

<Directory /usr/share/request-tracker4/html >
  Order allow,deny
  Allow from all
  SetHandler modperl
  PerlResponseHandler Plack::Handler::Apache2
  PerlSetVar psgi_app /usr/share/request-tracker4/libexec/rt-server
</Directory>

<Perl>
  use Plack::Handler::Apache2;
  Plack::Handler::Apache2->preload("/usr/share/request-tracker4/libexec/rt-server");
</Perl>
</VirtualHost>