I was having difficult running passenger-memory-stats, I was getting:
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.2/bin/passenger-memory-stats:145:in `list_processes': Invalid options. (ArgumentError)
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.2/bin/passenger-memory-stats:107:in `start'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.2/bin/passenger-memory-stats:214
from /usr/bin/passenger-memory-stats:19:in `load'
from /usr/bin/passenger-memory-stats:19
After googling around, I found a post that said:
For those on CentOS/RHEL change line 107 in /usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.2/bin/passenger-memory-stats from:
apache_processes = list_processes(:exe => PlatformInfo::HTTPD)
to
apache_processes = list_processes(:exe => 'httpd.worker')
This worked like a charm!
Friday, July 25, 2008
Thursday, July 24, 2008
Passenger Rocks
I set up Phusion Passenger which makes obsolete all the work I did for different Mongrel setups on my Capistrano scripts. It's amazing how much work I have done in my career that has now been made obsolute by something cooler. I still think FoxPro was the best.
Some notes to anyone setting up passenger. For CentOS, we had to install the package httpd-devel. The passenger setup script does the rest, you copy a few lines into your main http configuration file and it's good to go.
Here's my new configuration with SSL (names have been changed to protect my employer.) Note, my rails directory is /var/www/myrails/current:
Some notes to anyone setting up passenger. For CentOS, we had to install the package httpd-devel. The passenger setup script does the rest, you copy a few lines into your main http configuration file and it's good to go.
Here's my new configuration with SSL (names have been changed to protect my employer.) Note, my rails directory is /var/www/myrails/current:
<virtualhost>
ServerAdmin kevin@kenglish77.com
ServerName myrails.kenglish77.com
ErrorLog logs/myrails.kenglish77.com-error_log
CustomLog logs/myrails.kenglish77.com-access_log common
RewriteEngine On
RewriteCond %{SERVER_PORT} !443
RewriteRule ^(.*)$ https://myrails.kenglish77.com$1 [R=301,L]
</virtualhost>
<virtualhost>
ServerAdmin kevin@kenglish77.com
ServerName myrails.kenglish77.com
DocumentRoot "/var/www/myrails/current/public"
RailsEnv "id"
ErrorLog logs/myrails.kenglish77.com-ssl-error_log
CustomLog logs/myrails.kenglish77.com-ssl-access_log common
ExpiresActive On
ExpiresByType image/png "access plus 1 day"
ExpiresByType image/gif "access plus 1 day"
ExpiresByType image/jpeg "access plus 1 day"
ExpiresByType application/x-javascript "access plus 1 day"
ExpiresByType text/css "access plus 1 day"
RequestHeader set X_FORWARDED_PROTO 'https'
RewriteEngine On
# Force SSL
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,NE]
# Deflate
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
SSLCertificateFile /etc/pki/tls/certs/wildcard-kenglish77.crt
SSLCertificateKeyFile /etc/pki/tls/private/wildcard-kenglish77.key
SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
</virtualhost>
Subscribe to:
Posts (Atom)