Estou tentando rodar o servidor redmine + gitolite usando o apache em uma máquina Ubuntu. Eu segui as instruções dadas aqui com o seguinte arquivo de configuração do servidor:
<VirtualHost *:80>
ServerName redmine.xyz.com
ServerAdmin someone@somewhere
DocumentRoot /var/www/
PassengerUserSwitching on
RewriteEngine On
RewriteRule ^/?$ /redmine [R]
<Directory /var/www/redmine>
RailsBaseURI /redmine
PassengerResolveSymlinksInDocumentRoot on
PassengerUser redmine
PassengerGroup redmine
</Directory>
LogLevel info
ErrorLog ${APACHE_LOG_DIR}/error-redmine.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Agora, quando eu acessar o site, o seguinte é registrado no arquivo error.log
padrão:
[ 2015-11-07 12:44:45.7366 1568/7f9da7df9780 agents/HelperAgent/Main.cpp:643 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.1562/generation-0/request
[ 2015-11-07 12:44:45.7422 1574/7faddd156780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.1562/generation-0/logging
[ 2015-11-07 12:44:45.7424 1563/7f018bf01780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[Sat Nov 07 12:44:45.743089 2015] [mpm_event:notice] [pid 1562:tid 139811192584064] AH00489: Apache/2.4.7 (Ubuntu) Phusion_Passenger/4.0.37 configured -- resuming normal operations
[Sat Nov 07 12:44:45.743162 2015] [core:notice] [pid 1562:tid 139811192584064] AH00094: Command line: '/usr/sbin/apache2'
App 1677 stdout:
App 1677 stderr: --> No passenger_native_support.so found for current Ruby interpreter.
App 1677 stderr: This library provides various optimized routines that make
App 1677 stderr: Phusion Passenger faster. Please run 'sudo apt-get install passenger-dev'
App 1677 stderr: so that Phusion Passenger can compile one on the next run.
App 1677 stderr: --> Continuing without passenger_native_support.so.
App 1677 stderr: /var/lib/gems/2.2.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: duplicated key at line 466 ignored: "inodot"
[ 2015-11-07 12:45:17.4620 1568/7f9da7d02700 Pool2/SmartSpawner.h:301 ]: Preloader for /opt/redmine started on PID 1677, listening on unix:/tmp/passenger.1.0.1562/generation-0/backends/preloader.1677
App 1697 stdout:
App 1677 stderr: /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:356:in 'trap'
App 1677 stderr: : Invalid argument - SIGKILL (Errno::EINVAL)
App 1677 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:356:in 'block in reset_signal_handlers'
App 1677 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:354:in 'each_key'
App 1677 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:354:in 'reset_signal_handlers'
App 1677 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:182:in 'main_loop'
App 1677 stderr: from /usr/share/passenger/helper-scripts/rack-preloader.rb:161:in '<module:App>'
App 1677 stderr: from /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in '<module:PhusionPassenger>'
App 1677 stderr: from /usr/share/passenger/helper-scripts/rack-preloader.rb:28:in '<main>'
[ 2015-11-07 12:45:18.0075 1568/7f9da7de6700 Pool2/Pool.h:777 ]: Process (pid=1697, group=/opt/redmine#default) no longer exists! Detaching it from the pool.
App 1706 stdout:
App 1677 stderr: /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:356:in 'trap'
App 1677 stderr: : Invalid argument - SIGKILL (Errno::EINVAL)
App 1677 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:356:in 'block in reset_signal_handlers'
App 1677 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:354:in 'each_key'
App 1677 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:354:in 'reset_signal_handlers'
App 1677 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:182:in 'main_loop'
App 1677 stderr: from /usr/share/passenger/helper-scripts/rack-preloader.rb:161:in '<module:App>'
App 1677 stderr: from /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in '<module:PhusionPassenger>'
App 1677 stderr: from /usr/share/passenger/helper-scripts/rack-preloader.rb:28:in '<main>'
e o seguinte no personalizado error-redmine.log
:
[Sat Nov 07 12:45:17.629247 2015] [core:error] [pid 1584:tid 139811078739712] [client 106.51.26.94:30565] End of script output before headers: redmine
O servidor está funcionando quando começou a usar o comando:
bundle exec rails server -d -e production
Qual poderia ser o motivo do fracasso do Apache? Eu habilitei passenger
e rewrite
modules. O comando
sudo apt-get install passenger-dev
como sugerido no error.log
falha dizendo:
Unable to locate package passenger-dev