Question
Getting an error `127.0.0.1' is not a valid domain after every request on my rails app running on nginx server with unicorn. What to check?
****## Server Configuration
upstream app {
server unix:/home/deploy/project/shared/sockets/unicorn.sock fail_timeout=0;
}
server {
listen 80;
server_name *.mydomain;
root /home/deploy/project/current/public;
try_files $uri/index.html $uri @app;
location @app {
proxy_pass http://app;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
****## Stack trace
…by-2.1.2/gems/publicsuffix-1.5.1/lib/
publicsuffix.rb: 62:in parse'
setdomainvariable’
…ploy/bookafy/app/controllers/
application_controller.rb: 72:in
…ser-timezone-rails-1.0.1/lib/
browser-timezone-rails.rb: 15:in set_time_zone'
process’
…1.2/gems/actionview-4.1.5/lib/action_view/
rendering.rb: 30:in
…ct-1.3.1/app/middleware/
recurringselectmiddleware.rb: 24:in call'
call’
…ems/apipie-rails-0.3.6/lib/apipie/
static_dispatcher.rb: 65:in
…gems/ruby-2.1.2/gems/turnout-2.4.1/lib/rack/
turnout.rb: 25:in call'
call!’
…uby-2.1.2/gems/omniauth-1.2.2/lib/omniauth/
strategy.rb: 186:in
…uby-2.1.2/gems/omniauth-1.2.2/lib/omniauth/
strategy.rb: 164:in call'
call!’
…uby-2.1.2/gems/omniauth-1.2.2/lib/omniauth/
strategy.rb: 186:in
…uby-2.1.2/gems/omniauth-1.2.2/lib/omniauth/
strategy.rb: 164:in call'
call!’
…uby-2.1.2/gems/omniauth-1.2.2/lib/omniauth/
strategy.rb: 186:in
…uby-2.1.2/gems/omniauth-1.2.2/lib/omniauth/
strategy.rb: 164:in call'
call’
…ruby-2.1.2/gems/omniauth-1.2.2/lib/omniauth/
builder.rb: 59:in
…ms/apipie-rails-0.3.6/lib/apipie/extractor/
recorder.rb: 132:in call'
call’
…m/gems/ruby-2.1.2/gems/rack-1.5.5/lib/rack/
deflater.rb: 25:in
…ems/ruby-2.1.2/gems/warden-1.2.3/lib/warden/
manager.rb: 35:in block in call'
catch’
…ems/ruby-2.1.2/gems/warden-1.2.3/lib/warden/
manager.rb: 34:in
…ems/ruby-2.1.2/gems/warden-1.2.3/lib/warden/
manager.rb: 34:in call'
call’
…/.rvm/gems/ruby-2.1.2/gems/rack-1.5.5/lib/rack/
etag.rb: 23:in
…/ruby-2.1.2/gems/rack-1.5.5/lib/rack/
conditionalget.rb: 25:in call'
call’
…/.rvm/gems/ruby-2.1.2/gems/rack-1.5.5/lib/rack/
head.rb: 11:in
…-2.1.2/gems/rack-1.5.5/lib/rack/session/abstract/
id.rb: 225:in context'
call’
…-2.1.2/gems/rack-1.5.5/lib/rack/session/abstract/
id.rb: 220:in
…ruby-2.1.2/gems/quietassets-1.1.0/lib/
quietassets.rb: 27:in call_with_quiet_assets'
call’
…ms/request_store-1.2.0/lib/request_store/
middleware.rb: 8:in
…/ruby-2.1.2/gems/rack-1.5.5/lib/rack/
methodoverride.rb: 21:in call'
call’
…vm/gems/ruby-2.1.2/gems/rack-1.5.5/lib/rack/
runtime.rb: 17:in
…m/gems/ruby-2.1.2/gems/rack-1.5.5/lib/rack/
sendfile.rb: 112:in call'
processclient’
…by-2.1.2/gems/unicorn-5.5.0/lib/unicorn/
http_server.rb: 605:in
…vm/gems/ruby-2.1.2/gems/spawnling-2.1.6/lib/
patches.rb: 74:in `processclient’
…by-2.1.2/gems/unicorn-5.5.0/lib/unicorn/
httpserver.rb: 700:in `workerloop’
…by-2.1.2/gems/unicorn-5.5.0/lib/unicorn/
httpserver.rb: 548:in `spawnmissingworkers’
…by-2.1.2/gems/unicorn-5.5.0/lib/unicorn/
httpserver.rb: 144:in `start’
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
Just to get a bit more info, are you getting that error when you are going to domain.com in your browser?
Or where exactly are you receiving the error message, in browser, terminal, etc.:
error `127.0.0.1’ is not a valid domain