* 403 Forbidden from nginx when unicorn started in debug mode
@ 2012-12-04 21:57 Jerrold Thompson
2012-12-04 22:01 ` Jerrold Thompson
2012-12-05 0:10 ` Eric Wong
0 siblings, 2 replies; 3+ messages in thread
From: Jerrold Thompson @ 2012-12-04 21:57 UTC (permalink / raw)
To: mongrel-unicorn
I am using nginx with unicorn as a reverse proxy.
Has been fantastic, but needed to look through some code
for first time.
Using ruby 1.9.3p194 with rails 3.2.9, development mode with ssl enabled,
I start unicorn with -d
...and it does not get served up by nginx.
Any ideas, or more information needed?
Thanks!
Jet
Below is my unicorn.rb for developent:
# config/unicorn.rb
env = "development"
preload_app true
timeout 30
listen "/tmp/unicorn.sock", :backlog => 64
if env == 'development'
pid
"/home/jet/RailsApps/spree/aceleathergoods/tmp/pids/unicorn.aceleathergoods.pid"
stderr_path "/var/www/aceleathergoods/shared/log/unicorn.stderr.log"
stdout_path "/var/www/aceleathergoods/shared/log/unicorn.stdout.log"
end
before_fork do |server, worker|
if defined?(ActiveRecord::Base)
ActiveRecord::Base.connection.disconnect!
end
old_pid = "#{shared_path}/pids/unicorn.aceleathergoods.pid.oldbin"
if File.exists?(old_pid) && server.pid != old_pid
begin
Process.kill("QUIT", File.read(old_pid).to_i)
rescue Errno::ENOENT, Errno::ESRCH
# someone else did our job for us
end
end
end
after_fork do |server, worker|
if defined?(ActiveRecord::Base)
ActiveRecord::Base.establish_connection
end
end
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 403 Forbidden from nginx when unicorn started in debug mode
2012-12-04 21:57 403 Forbidden from nginx when unicorn started in debug mode Jerrold Thompson
@ 2012-12-04 22:01 ` Jerrold Thompson
2012-12-05 0:10 ` Eric Wong
1 sibling, 0 replies; 3+ messages in thread
From: Jerrold Thompson @ 2012-12-04 22:01 UTC (permalink / raw)
To: mongrel-unicorn
...in Gemfile:
gem 'debugger', :git => 'git://github.com/cldwalker/debugger.git',
:require => 'debugger'
On 12/04/2012 01:57 PM, Jerrold Thompson wrote:
> I am using nginx with unicorn as a reverse proxy.
>
> Has been fantastic, but needed to look through some code
> for first time.
>
> Using ruby 1.9.3p194 with rails 3.2.9, development mode with ssl enabled,
>
> I start unicorn with -d
>
> ...and it does not get served up by nginx.
>
> Any ideas, or more information needed?
>
> Thanks!
>
> Jet
>
> Below is my unicorn.rb for developent:
>
> # config/unicorn.rb
>
> env = "development"
>
> preload_app true
>
> timeout 30
>
> listen "/tmp/unicorn.sock", :backlog => 64
>
> if env == 'development'
> pid
> "/home/jet/RailsApps/spree/aceleathergoods/tmp/pids/unicorn.aceleathergoods.pid"
>
> stderr_path "/var/www/aceleathergoods/shared/log/unicorn.stderr.log"
> stdout_path "/var/www/aceleathergoods/shared/log/unicorn.stdout.log"
> end
>
>
> before_fork do |server, worker|
> if defined?(ActiveRecord::Base)
> ActiveRecord::Base.connection.disconnect!
> end
>
> old_pid = "#{shared_path}/pids/unicorn.aceleathergoods.pid.oldbin"
> if File.exists?(old_pid) && server.pid != old_pid
> begin
> Process.kill("QUIT", File.read(old_pid).to_i)
> rescue Errno::ENOENT, Errno::ESRCH
> # someone else did our job for us
> end
> end
> end
>
> after_fork do |server, worker|
> if defined?(ActiveRecord::Base)
> ActiveRecord::Base.establish_connection
> end
> end
>
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 403 Forbidden from nginx when unicorn started in debug mode
2012-12-04 21:57 403 Forbidden from nginx when unicorn started in debug mode Jerrold Thompson
2012-12-04 22:01 ` Jerrold Thompson
@ 2012-12-05 0:10 ` Eric Wong
1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2012-12-05 0:10 UTC (permalink / raw)
To: unicorn list
Jerrold Thompson <jet@whidbey.com> wrote:
> I am using nginx with unicorn as a reverse proxy.
>
> Has been fantastic, but needed to look through some code
> for first time.
>
> Using ruby 1.9.3p194 with rails 3.2.9, development mode with ssl enabled,
>
> I start unicorn with -d
>
> ...and it does not get served up by nginx.
>
> Any ideas, or more information needed?
Can you check your nginx error_log? This is probably an error in
the nginx configuration.
> if env == 'development'
> pid "/home/jet/RailsApps/spree/aceleathergoods/tmp/pids/unicorn.aceleathergoods.pid"
> stderr_path "/var/www/aceleathergoods/shared/log/unicorn.stderr.log"
> stdout_path "/var/www/aceleathergoods/shared/log/unicorn.stdout.log"
In case nginx is configured correctly, maybe the output of stderr
can tell you something.
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-05 0:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-04 21:57 403 Forbidden from nginx when unicorn started in debug mode Jerrold Thompson
2012-12-04 22:01 ` Jerrold Thompson
2012-12-05 0:10 ` Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).