我正在尝试在我的服务器上安装 Redmine。
场景: 当我访问我的服务器 URL -> http:\domain-server.local 时: 我得到了 Apache Windows“它可以工作”。 如果我尝试 https://domain-server.local/redmine : 错误:
Ruby on Rails application could not be started
A source file that the application requires, is missing.
It is possible that you didn't upload your application files correctly. Please check whether all your application files are uploaded.
A required library may not installed. Please install all libraries that this application requires.
Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.
Error message:
cannot load such file -- /opt/config/environment
Exception class:
LoadError
Application root:
/opt
现在我试试:domain-server.local/redmine: 我得到了那个错误:
Passenger error #2 An error occurred while trying to access '/var/www/redmine/public/redmine': Cannot resolve possible symlink '/var/www/redmine/public/redmine': No such file or directory (2)
更奇怪:当我从我的 URL 和/redmine 中删除 http:\ 我的 redmine 开始工作了:
Environment:
Redmine version 3.0.1.stable
Ruby version 1.9.3-p194 (2012-04-20) [x86_64-linux]
Rails version 4.2.0
Environment production
Database adapter PostgreSQL
SCM:
Subversion 1.6.17
Git 1.7.10.4
Filesystem
Redmine plugins:
no plugin installed
但我想从 http:\domain-server.local/redmine 访问 redmin
这是我的 apache2.conf 文件:
# Include the virtual host configurations:
Include sites-enabled/
RailsBaseURI /redmine
PassengerUserSwitching on
PassengerUser www-data
PassengerGroup www-data
<VirtualHost *:80>
ServerName domain-server.local
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /var/www/redmine/public
RailsEnv production
RailsBaseURI /redmine
<Directory /var/www/redmine>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
# Uncomment this if you're on Apache >= 2.4:
#Require all granted
</Directory>
我的安装有什么问题?
最佳答案
我解决了我的问题。
我删除了 apache2.conf 文件的内容。
我还有 2 个不同的 Phusion_Passenger 版本,所以我删除了最旧的并使用 Phusion_Passenger 5.0.5。
我将符号链接(symbolic link)/var/www/redmine ->/opt/redmine-3.0.1 更改为/opt/redmine-3.0.1/public
我使用 passenger-install-apache2-module 指令在/etc/apache2/mods-available/中创建了 passenger.load 和 passenger.conf 文件。
然后重启apache,大功告成!
关于postgresql - 使用 postgreSql 和 apache 安装 redmine 3.0.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29280150/