简体   繁体   English

Apache重定向到Perl脚本

[英]Apache redirect to perl script

I'm currently using Apache's vhosts configuration to redirect request to the server, eg 我目前正在使用Apache的vhosts配置将请求重定向到服务器,例如

<VirtualHost IP:80>
ServerName http://domain.info
Redirect / http://otherdomain.com
</VirtualHost>

<VirtualHost IP:80>
ServerName http://subdomain.domain.info
Redirect / http://domain:port
</VirtualHost>

Now I installed AWstats which can be started by using the command 现在我安装了AWstats,可以使用以下命令启动它

http://localhost/cgi-bin/awstats.pl

I assume that if I add this block to vhosts 我假设如果我将此块添加到虚拟主机

<VirtualHost IP:80>
ServerName http://stats.domain.info
Redirect / http://domain.info/cgi-bin/awstats.pl
</VirtualHost>

I can remote-access AWstats using 我可以使用以下方式远程访问AWstats:

http://domain.info/cgi-bin/awstats.pl

but all I get is 但我得到的只是

http://otherdomain.comcgi-bin/awstats.pl

What am I doing wrong? 我究竟做错了什么?

Greetz holgrich 格蕾兹·霍尔格里奇

The question is still open, but for now I used a workaround: 这个问题仍然悬而未决,但是现在我使用了一种解决方法:

<VirtualHost IP:80>
ServerName http://domain.info
[Redirect to local html that contains frame forwarding]
</VirtualHost>

<VirtualHost IP:80>
ServerName http://subdomain.domain.info
Redirect / http://domain:port
</VirtualHost>

Now this works 现在这有效

<VirtualHost IP:80>
ServerName http://stats.domain.info
Redirect / http://domain.info/cgi-bin/awstats.pl
</VirtualHost>

So that I can remote-access AWstats using 这样我就可以使用以下方式远程访问AWstats

http://domain.info/cgi-bin/awstats.pl

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

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