Created
November 14, 2011 08:20
-
-
Save bonyiii/1363518 to your computer and use it in GitHub Desktop.
compile passenger as user mod_rails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rvm use ruby-1.9.2@rails31 | |
| gem install passenger | |
| export CPLUS_INCLUDE_PATH=/usr/include/apache2/:/usr/include/apr-1 | |
| export PATH=$PATH:/usr/sbin | |
| rake apache2 --trace | |
| #/etc/make.conf | |
| APACHE2_MODULES="alias auth_basic authn_alias authn_file authz_groupfile authz_host authz_user cache dav dav_fs dav_lock deflate headers proxy proxy_http rewrite setenvif status autoindex dir env log_config logio mime negotiation filter expires" | |
| APACHE2_MPMS="prefork" | |
| #/etc/apache/httpd.conf | |
| <IfDefine HEADERS> | |
| LoadModule headers_module modules/mod_headers.so | |
| </IfDefine> | |
| #<IfDefine EXPIRES> | |
| LoadModule expires_module modules/mod_expires.so | |
| #</IfDefine> | |
| #/etc/conf.d/apache2 | |
| APACHE2_OPTS="-D INFO -D SSL -D LANGUAGE -D PHP5 -D DAV -D SVN -D HEADERS -D PROXY -D HEADERS" | |
| # to serve static assets with proxy | |
| #<IfDefine HEADERS> | |
| <LocationMatch "^/assets/.*$"> | |
| # Some browsers still send conditional-GET requests if there's a | |
| # Last-Modified header or an ETag header even if they haven't | |
| # reached the expiry date sent in the Expires header. | |
| Header unset Last-Modified | |
| Header unset ETag | |
| FileETag None | |
| # RFC says only cache for 1 year | |
| ExpiresActive On | |
| ExpiresDefault "access plus 1 year" | |
| </LocationMatch> | |
| #</IfDefine> | |
| RewriteEngine On | |
| RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f | |
| RewriteRule ^/(.*) http://localhost:3000/%{REQUEST_URI} [P,QSA,L] | |
| </VirtualHost> | |
| # Maybe... | |
| http://lesscode.blogspot.com/2011/03/install-passenger-with-ruby-192.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment