我在Debian服务器上安装了Redmine,但我不知道如何正确configurationApache2,以便Redmine文件夹的内容和Redmine的起始页面都不会显示为我的网站的主页。 假设该网站的url是www.myexample.com。
当前状态
/var/www/redmine
文件夹的文件 /var/www/redmine -> /usr/local/lib/redmine-2.1/public/
想要的状态
我想这只是一个configuration问题,但我不知道这个问题。 所以这里是我的configuration文件。 你看到我在这里失踪了吗?
/etc/apache2/httpd.conf
<VirtualHost *:80> ServerName redmine.example.com DocumentRoot /var/www <Directory /var/www> AllowOverride all Options -MultiViews </Directory> </VirtualHost>
在/ etc / apache2的/网站可用/pipe理平台
<VirtualHost *:80> DocumentRoot /var/www/redmine <Directory /var/www/redmine> AllowOverride all Options -MultiViews RailsBaseURI /redmine </Directory> </VirtualHost>
在/ etc / apache2的/网站可用/默认
<VirtualHost *:80> ServerAdmin webmaster@localhost 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>
在更改任何这些文件后,是否必须重新启动Apache2或使用a2ensite来激活任何主机?
我已经写了一个如何包括这个。 虽然它是关于Redmine 1.3.x,它应该仍然是相关的Apache部分。
完整的方法: Redmine稳定在Debian上 。 基本上,这归结为:
在/etc/apache2/mods-available/passenger.conf
安装并configurationmod_passenger
:
PassengerDefaultUser www-data # Below are some lines to tweak mod-passenger. # This keeps some Ruby processes running, # but the average response time is a lot lower # on low-traffic sites. RailsSpawnMethod smart PassengerPoolIdleTime 3000 RailsAppSpawnerIdleTime 0 PassengerMaxRequests 1000
扩展当前的主站点,例如/etc/apache2/sites-available/mymainsite
:
<Directory /var/www/redmine> RailsBaseURI /redmine PassengerResolveSymlinksInDocumentRoot on </Directory>
创build另一个“网站”,并包含上面的相同,将RailsBaseURI
值更改为/
。