Skip to content

Instantly share code, notes, and snippets.

@paulmakepeace
Created March 2, 2012 20:14
Show Gist options
  • Save paulmakepeace/1960979 to your computer and use it in GitHub Desktop.
Save paulmakepeace/1960979 to your computer and use it in GitHub Desktop.
vhost error_log ignored with passenger
require 'sinatra'
get '/' do
$stderr.puts "stderr"
$stdout.puts "stdout"
'got /'
end
require 'sinatra'
require 'app.rb'
run Sinatra::Application
worker_processes 1;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
passenger_root /Library/Ruby/Gems/1.8/gems/passenger-3.0.11;
passenger_ruby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby;
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
keepalive_timeout 65;
server {
listen 8082;
access_log logs/ruby-access.log main;
error_log logs/ruby-error.log;
root /Users/paulm/Code/nginx/public;
location / {
passenger_enabled on;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment