前途多難ぽい
nginx もアップグレード
wget http://nginx.org/download/nginx-1.3.11.tar.gz
tar -zxvf nginx-1.3.11.tar.gz
その前に SPDY の導入
wget http://www.openssl.org/source/openssl-1.0.1d.tar.gz
tar -zxvf openssl-1.0.1d.tar.gz
cd openssl-1.0.1d
./config
make
make install
続き。
cd ../
cd nginx-1.3.11
wget http://nginx.org/patches/spdy/patch.spdy-58_1.3.11.txt
patch -p1 < patch.spdy-58_1.3.11.txt
CFLAGS="-g -O3 -m64" ./configure --user=wwwadmin --group=wwwadmin \
--with-http_gzip_static_module --lock-path=/var/lock/nginx.lock \
--conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/apache/nginx_error_log \
--pid-path=/var/run/nginx/nginx.pid --http-log-path=/var/log/apache/nginx_access_log\
--with-http_stub_status_module --with-http_ssl_module --with-http_spdy_module \
--http-client-body-temp-path=/var/tmp/nginx/client/
make -j2
gem install passenger
Fetching: fastthread-1.0.7.gem (100%)
Building native extensions. This could take a while...
Fetching: daemon_controller-1.1.1.gem (100%)
Fetching: passenger-3.0.19.gem (100%)
Successfully installed fastthread-1.0.7
Successfully installed daemon_controller-1.1.1
Successfully installed passenger-3.0.19
3 gems installed
Installing ri documentation for fastthread-1.0.7...
Installing ri documentation for daemon_controller-1.1.1...
Installing ri documentation for passenger-3.0.19...
Installing RDoc documentation for fastthread-1.0.7...
Installing RDoc documentation for daemon_controller-1.1.1...
Installing RDoc documentation for passenger-3.0.19...
質問される
Where is your Nginx source code located?
Where do you want to install Nginx to?
Please specify a prefix directory [/opt/nginx]: /usr/local/nginx
Please specify the directory: /usr/local/src/nginx-1.3.11
sh ./configure --prefix='/usr/local/nginx' --with-http_ssl_module --with-http_gzip_static_module --with-cc-opt='-Wno-error' --add-module='/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/ext/nginx
CFLAGS="-g -O3 -m64" ./configure --user=wwwadmin --group=wwwadmin \
--user=wwwadmin --group=wwwadmin --lock-path='/var/lock/nginx.lock' --with-http_stub_status_module --with-http_spdy_module --conf-path='/etc/nginx/nginx.conf' --pid-path='/var/run/nginx/nginx.pid' --error-log-path='/var/log/apache/nginx_error_log' --http-log-path='/var/log/apache/nginx_access_log'
Suppose you have a Ruby on Rails application in /somewhere. Add a server block
to your Nginx configuration file, set its root to /somewhere/public, and set
'passenger_enabled on', like this:
server {
listen 80;
server_name www.yourhost.com;
root /somewhere/public; # <--- be sure to point to 'public'!
passenger_enabled on;
}
And that's it! You may also want to check the Users Guide for security and
optimization tips and other useful information:
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/doc/Users guide Nginx.html
Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)
https://www.phusionpassenger.com
Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
今日はここまで。