【发布时间】:2014-04-14 12:06:15
【问题描述】:
我有一个 vps 服务器。 LAMP 安装在其中。
Consider the IP as 99.88.77.66
我想在这个站点上运行两个应用程序。一个是vtiger,另一个是redmine。
Installation Location
redmine: /var/www/html/redmine
vtiger: /var/www/html/vtigerCRM
我将 httpd.conf 配置为..
ServerName 99.88.77.66:80
..
DocumentRoot "/var/www/html"
..
<Directory "/var/www/html">
..
NameVirtualHost *:80
..
<VirtualHost *:80>
DocumentRoot "/var/www/html"
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/html/redmine/public"
ServerName localhost
ServerAlias redmine
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/html/vtigerCRM"
ServerName localhost
ServerAlias vtiger
</VirtualHost>
/etc/hosts as..
127.0.0.1 redmine
127.0.0.1 vtiger
127.0.0.1 localhost
请帮助我以这样的方式进行配置,通过访问 http://99.88.77.66/redmine -- 我将能够访问 redmine 并通过 http://99.88.77.66/vtiger -- vtigerCRM。
【问题讨论】:
-
您不需要虚拟主机通过相同的 IP 和不同的文件夹访问两个站点。只有一个主机名和两个文件夹。
-
嗨,我可以通过
http://99.88.77.66/vtigerCRM访问,但是当我使用 redmine 时,目录列表正在发生。默认情况下 redmine documentroot 假设为http://99.88.77.66/redmine/public -
为此设置重写?
-
我没看懂抱歉,如果可以的话请你帮我重新写一下好吗?
-
放入
/redmine/.htaccess: RewriteEngine On RewriteRule ^$ /public/ [R=301,L]
标签: linux apache redmine vtiger