为RedmineconfigurationApache子域

我有一台名为DEV01.intranet的服务器,我已经安装了Redmine。

我设法configuration一个子域redmine.dev01.intranet,现在正在工作,但是当我单独去dev01.intranet它再次显示Redmine(?? !!!)

我想从http://redmine.dev01.intranet和http://dev01.intranet/redmine访问Redmine。

我有这些在网站启用:

GNU nano 2.2.6文件:/ etc / apache2 / sites-enabled / default1

<VirtualHost *:80> DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> 

GNU nano 2.2.6文件:/ etc / apache2 / sites-enabled / redmine

 <VirtualHost redmine.dev01.intranet.fusiondev.com.ar:80> ServerName redmine.dev01.intranet.fusiondev.com.ar DocumentRoot /usr/local/share/redmine/public ServerAlias redmine.dev01.intranet.fusiondev.com.ar ServerAdmin [email protected] LogLevel warn ErrorLog /var/log/apache2/redmine_error CustomLog /var/log/apache2/redmine_access combined RailsEnv production RailsBaseURI /redmine PassengerDefaultUser www-data PassengerResolveSymlinksInDocumentRoot on <Directory /var/www/redmine> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> </VirtualHost> 

我在做什么错误,为什么Redmine显示在根/当没有人这样说?

谢谢!

我终于来到了解决scheme。

更大的问题解决了将000-xxx,001-xxx(号码前缀)添加到VirtualHosts站点的符号链接 – 启用站点的可用性。 这样dev01就会先载入,然后redmine.dev01。

最后,我没有加载第二个Redmine的CSS。 如果我在Apache重新启动后首先进入redmine.dev01,它将加载OK。 但是de01 / redmine不会有CSS,反之亦然,如果我先加载它。

解决方法是复制源文件夹并将子域DocumentRoot指向第二个文件夹。 这就像一个新的例子。 没有太多的search其他解决scheme,但由于数据库是相同的,它只有60MB的浪费磁盘空间和内存中的第二个实例(如果这是Ruby on Rails的pipe理方式)。

我的虚拟主机,万一有人需要帮忙。

GNU nano 2.2.6文件:/ etc / apache2 / sites-enabled / 000-dev01

 <VirtualHost *:80> ServerAdmin [email protected] ServerName dev01.intranet.fusiondev.com.ar ServerAlias www.dev01.intranet.fusiondev.com.ar DocumentRoot /var/www/dev01 <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/dev01> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> <Directory /var/www/dev01/redmine> RailsBaseURI /redmine PassengerResolveSymlinksInDocumentRoot on Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> 

GNU nano 2.2.6文件:/etc/apache2/sites-enabled/001-redmine.dev01

 <VirtualHost *:80> ServerName redmine.dev01.intranet.fusiondev.com.ar DocumentRoot /var/www/redmine.dev01/redmine ServerAlias www.redmine.dev01.intranet.fusiondev.com.ar ServerAdmin [email protected] LogLevel warn ErrorLog /var/log/apache2/redmine_error CustomLog /var/log/apache2/redmine_access combined RailsEnv production RailsBaseURI /redmine PassengerDefaultUser www-data PassengerResolveSymlinksInDocumentRoot on <Directory /var/www/redmine.dev01/redmine> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> </VirtualHost> 

尝试传播:

 <VirtualHost redmine.dev01.intranet.fusiondev.com.ar:80> 

 <VirtualHost *:80> 

虚拟主机和IP地址有点棘手 – 看这里的细节。