Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Bug 1191517 - Passenger ErrorPages #6072

Merged
merged 1 commit into from
Feb 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions cartridges/openshift-origin-cartridge-ruby/bin/control
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ source "${OPENSHIFT_RUBY_DIR}/lib/ruby_context"

HTTPD_CFG_DIR=${OPENSHIFT_RUBY_DIR}/etc/conf.d
HTTPD_CFG_FILE=$OPENSHIFT_RUBY_DIR/etc/conf/httpd_nolog.conf
ERB_HTTPD_CFG_DIR=${OPENSHIFT_RUBY_DIR}versions/${OPENSHIFT_RUBY_VERSION}/etc/conf.d/
HTTPD_PASSENV_FILE=${HTTPD_CFG_DIR}/passenv.conf
HTTPD_PID_FILE=$OPENSHIFT_RUBY_DIR/run/httpd.pid
RAILS_ENV=${RAILS_ENV:-production}
Expand Down Expand Up @@ -64,6 +65,7 @@ function restart() {
echo "${1}ing Ruby cartridge"
mkdir -p ${OPENSHIFT_REPO_DIR}public
write_httpd_passenv $HTTPD_PASSENV_FILE
oo-erb ${ERB_HTTPD_CFG_DIR}openshift.conf.erb > ${HTTPD_CFG_DIR}/openshift.conf
oo-erb ${OPENSHIFT_RUBY_DIR}conf/performance.conf.erb.hidden > $HTTPD_CFG_DIR/performance.conf
[ -d ${OPENSHIFT_REPO_DIR}/tmp ] && touch ${OPENSHIFT_REPO_DIR}/tmp/restart.txt
ensure_httpd_restart_succeed "$HTTPD_PID_FILE" "$HTTPD_CFG_FILE"
Expand Down
2 changes: 1 addition & 1 deletion cartridges/openshift-origin-cartridge-ruby/bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ done

# Create/truncate Apache PassEnv configuration file
echo > $OPENSHIFT_RUBY_DIR/etc/conf.d/passenv.conf

echo > $OPENSHIFT_RUBY_DIR/etc/conf.d/openshift.conf
echo > $OPENSHIFT_RUBY_DIR/etc/conf.d/server-status.conf

if [ $version == '1.9' ]; then
Expand Down
5 changes: 5 additions & 0 deletions cartridges/openshift-origin-cartridge-ruby/bin/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ if [[ "$next" == "0.0.14" ]]; then
rm -f ${OPENSHIFT_RUBY_DIR}env/LD_LIBRARY_PATH
fi
fi

if [[ "$next" == "0.0.24" ]]; then
chown $OPENSHIFT_GEAR_UUID:$OPENSHIFT_GEAR_UUID ${OPENSHIFT_RUBY_DIR}etc/conf.d/openshift.conf
chcon -u unconfined_u ${OPENSHIFT_RUBY_DIR}etc/conf.d/openshift.conf
fi
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ locked_files:
- etc/conf/
- etc/conf/*
- etc/conf.d/
- etc/conf.d/openshift.conf
- env/
- env/OPENSHIFT_RUBY_DIR
- env/PASSENGER_TEMP_DIR
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
LoadModule passenger_module modules/mod_passenger.so

<IfModule mod_passenger.c>
PassengerRoot NativelyPackaged
PassengerRuby /usr/bin/ruby
Expand All @@ -19,8 +20,12 @@ PassengerPreStart http://<%= ENV['OPENSHIFT_RUBY_IP'] %>:<%= ENV['OPENSHIFT_RUBY
PassengerSpawnIPAddress <%= ENV['OPENSHIFT_RUBY_IP'] %>
PassengerUseGlobalQueue off
PassengerTempDir /tmp/passenger

<% unless ENV['RAILS_ENV'] == "development" %>
PassengerFriendlyErrorPages off
<% end %>

<Directory <%= ENV['OPENSHIFT_REPO_DIR'] %>/public/>
AllowOverride All
Options -Multiviews
</Directory>

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ LoadModule passenger_module /usr/lib64/httpd/modules/ruby193-mod_passenger.so
PassengerSpawnMethod conservative
</IfModule>


ServerRoot "<%= ENV['OPENSHIFT_RUBY_DIR'] %>"
DocumentRoot "<%= ENV['OPENSHIFT_REPO_DIR'] %>/public"
Listen <%= ENV['OPENSHIFT_RUBY_IP'] %>:<%= ENV['OPENSHIFT_RUBY_PORT'] %>
Expand All @@ -21,8 +20,12 @@ PassengerPreStart http://<%= ENV['OPENSHIFT_RUBY_IP'] %>:<%= ENV['OPENSHIFT_RUBY
PassengerSpawnIPAddress <%= ENV['OPENSHIFT_RUBY_IP'] %>
PassengerUseGlobalQueue off
PassengerTempDir /tmp/passenger

<% unless ENV['RAILS_ENV'] == "development" %>
PassengerFriendlyErrorPages off
<% end %>

<Directory <%= ENV['OPENSHIFT_REPO_DIR'] %>/public/>
AllowOverride All
Options -Multiviews
</Directory>

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ PassengerUser <%= ENV['OPENSHIFT_GEAR_UUID'] %>
PassengerPreStart http://<%= ENV['OPENSHIFT_RUBY_IP'] %>:<%= ENV['OPENSHIFT_RUBY_PORT'] %>/
PassengerTempDir /tmp/passenger

<% unless ENV['RAILS_ENV'] == "development" %>
PassengerFriendlyErrorPages off
<% end %>

<% if ENV['RAILS_ENV'] == "development" %>
PassengerLogLevel 1
<% end %>
Expand All @@ -31,4 +35,3 @@ PassengerLogLevel 1
AllowOverride All
Options -Multiviews
</Directory>