Created
March 2, 2012 01:35
-
-
Save paulmakepeace/1954652 to your computer and use it in GitHub Desktop.
nginx ignoring error_log?
This file contains 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
require 'rubygems' | |
require 'bundler/setup' | |
require 'sinatra' | |
#require 'logger' | |
get '/' do | |
# log = File.open('/tmp/registry.log', 'a') | |
#STDERR.reopen(log) | |
#STDOUT.reopen(log) | |
#logger = Logger.new(STDOUT) | |
#logger.info('LOGGER logger.info') | |
#Rails.logger.error("Rails.logger.error") | |
#env['rack.error'].write("env['rack.errors']\n") | |
$stderr.puts "$STDERR" | |
$stdout.puts "$STDOUT" | |
STDERR.puts "STDERR" | |
STDOUT.puts "STDOUT" | |
puts "puts" | |
'hello!' | |
end |
This file contains 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
server { | |
listen 82; | |
location / { | |
passenger_enabled on; | |
root /Users/paulm/public; | |
access_log logs/daemons-access.log main; | |
error_log /tmp/daemons-error.log; | |
} | |
} | |
# more like this |
This file contains 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
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#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; | |
access_log logs/access.log main; | |
#sendfile on; | |
#tcp_nopush on; | |
#keepalive_timeout 0; | |
keepalive_timeout 65; | |
#gzip on; | |
include /opt/nginx/conf/sites/*.conf; | |
#rack_env staging; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment