I'm having a problem with PassengerPreStart not working in either combination.
Server details:
Centos 7, Passenger 5.0.28, Apache 2.4.6
Passenger installed with yum. It is working (passenger-status shows expected output when used) ok, both sites work fine.
First, a single vhost and 1 PassengerPreStart use:
vhost.conf:
<VirtualHost 172.16.198.57:80>
ServerName operations.example.co
DocumentRoot /home/redmine/app/public
<Directory /home/redmine/app/public>
AllowOverride all
Options -MultiViews
Require all granted
</Directory>
PassengerFriendlyErrorPages on
PassengerBaseURI /home/redmine/app/public
PassengerMinInstances 1
</VirtualHost>
PassengerPreStart http://operations.example.co/
I start apache, all starts ok, no errors. Passenger is started.
passenger-status
shows 0 app groups, 0 processes.
I then go to 172.16.198.57, wait 20 seconds, the page loads.
passenger-status
shows 1 app group, 1 process for /home/redmine/app.
So no error but it didn't seem to work.
I then added a second vhost:
<VirtualHost 172.16.198.57:82>
ServerName operations.example.co
DocumentRoot /home/tracks/app/public
<Directory /home/tracks/app/public>
AllowOverride all
Options -MultiViews
Require all granted
</Directory>
PassengerFriendlyErrorPages on
PassengerBaseURI /home/tracks/app/public
PassengerMinInstances 1
</VirtualHost>
PassengerPreStart http://operations.example.co:82/
Now when I restart httpd, error log shows:
/usr/share/passenger/helper-scripts/prespawn:131:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)
from /usr/share/passenger/helper-scripts/prespawn:131:in `new'
from /usr/share/passenger/helper-scripts/prespawn:131:in `rescue in connect'
from /usr/share/passenger/helper-scripts/prespawn:129:in `connect'
from /usr/share/passenger/helper-scripts/prespawn:89:in `socket'
from /usr/share/passenger/helper-scripts/prespawn:108:in `head_request'
from /usr/share/passenger/helper-scripts/prespawn:171:in `<main>'
Same results if I change PassengerPreStart to use http://172.16.198.57(:82)/
Both scenarios produce the same results regardless of adding 127.0.0.1 operations.example.co
to/etc/hosts or not (no idea if that's relevant, but thought I should try!).
Any suggestions / ideas please? Hope I've included all the relevant information, sorry if I missed anything.
PassengerBaseURI /home/tracks/app/public
<VirtualHost 127.0.0.1:80 172.16.198.57:80>
<VirtualHost 127.0.0.1 172.16.198.57:80>
ServerName operations.cfts.co
DocumentRoot /home/redmine/app/public
PassengerRuby /usr/local/rvm/gems/ruby-2.3.0/wrappers/ruby
<Directory /home/redmine/app/public>
AllowOverride all
Options -MultiViews
Require all granted
</Directory>
PassengerFriendlyErrorPages on
PassengerMinInstances 1
</VirtualHost>
PassengerPreStart http://operations.cfts.co/