[英]Apache redirect to perl script
我目前正在使用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>
现在我安装了AWstats,可以使用以下命令启动它
http://localhost/cgi-bin/awstats.pl
我假设如果我将此块添加到虚拟主机
<VirtualHost IP:80>
ServerName http://stats.domain.info
Redirect / http://domain.info/cgi-bin/awstats.pl
</VirtualHost>
我可以使用以下方式远程访问AWstats:
http://domain.info/cgi-bin/awstats.pl
但我得到的只是
http://otherdomain.comcgi-bin/awstats.pl
我究竟做错了什么?
格蕾兹·霍尔格里奇
这个问题仍然悬而未决,但是现在我使用了一种解决方法:
<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>
现在这有效
<VirtualHost IP:80>
ServerName http://stats.domain.info
Redirect / http://domain.info/cgi-bin/awstats.pl
</VirtualHost>
这样我就可以使用以下方式远程访问AWstats
http://domain.info/cgi-bin/awstats.pl
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.