Skip to content

Instantly share code, notes, and snippets.

@gumayunov
Created September 15, 2009 12:36
Show Gist options
  • Save gumayunov/187260 to your computer and use it in GitHub Desktop.
Save gumayunov/187260 to your computer and use it in GitHub Desktop.
nginx with passenger, ubuntu
#!/bin/sh
./configure \
--add-module=/var/lib/gems/1.8/gems/passenger-2.2.5/ext/nginx \
--prefix=/usr \
--sbin-path=/usr/sbin \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--http-log-path=/var/log/nginx/access.log \
--http-client-body-temp-path=/var/lib/nginx/body \
--http-proxy-temp-path=/var/lib/nginx/proxy \
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
--with-http_stub_status_module \
--with-http_flv_module \
--with-http_ssl_module \
--with-http_dav_module \
--with-http_realip_module
sudo aptitude install nginx
sudo gem install passenger
cd /var/lib/gems/1.8/gems/passenger-2.2.5/ext/nginx
sudo rake nginx
cd /tmp
wget http://sysoev.ru/nginx/nginx-0.7.62.tar.gz
tar -xzf nginx-0.7.62.tar.gz
cd nginx-0.7.62
./config-with-passenger.sh
make && sudo make install
echo "passenger_root /var/lib/gems/1.8/gems/passenger-2.2.5;\npassenger_ruby /usr/bin/ruby;" > /etc/nginx/conf.d/passenger.conf
sudo /etc/init.d/nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment