Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session always times out #53

Open
ManuelFrigerio opened this issue Apr 8, 2017 · 7 comments
Open

Session always times out #53

ManuelFrigerio opened this issue Apr 8, 2017 · 7 comments

Comments

@ManuelFrigerio
Copy link

ManuelFrigerio commented Apr 8, 2017

Hi,

I'm trying to proxy my blog, located at blog.mywebsite.com to mywebsite.com/blog.

I've followed the Readme and added this code to /config.rb

config.middleware.insert(0, Rack::ReverseProxy) do
    reverse_proxy_options preserve_host: false
    if Rails.env.production? or Rails.env.staging?
        reverse_proxy_options force_ssl: true, replace_response_host: true
    end
    reverse_proxy /^\/blog(\/?.*)$/, 'https://blog.mywebsite.com$1'
end

However when I try and visit mywebsite.com/blog it always times out.

It's also worth mentioning that it was working ok until I updated the gem.
Before I was just added this to my /config.ru file

use Rack::ReverseProxy do  
  reverse_proxy(/^\/blog(\/.*)$/,
    'https://blog.mywebsite.com$1',
    opts = {:preserve_host => true})
end  

run Rails.application

Can anyone please help me out?

Thanks

@waterlink
Copy link
Owner

@ManuelFrigerio Thank you for the bug report. Do you have anything related in the log output?

@ManuelFrigerio
Copy link
Author

ManuelFrigerio commented Apr 9, 2017

Thanks @waterlink
Yes, I have this:

Net::OpenTimeout: execution expired

begin
  TCPSocket.open(conn_address, conn_port, @local_host, @local_port)

Can you please help me? I got my blog completely unaccessible now

@ManuelFrigerio
Copy link
Author

The only thing I want to do is to reverse proxy my wordpress blog located at blog.mywebsite.com to my rails app on mywebsite.com/blog.

@waterlink
Copy link
Owner

@ManuelFrigerio First of all, you could always downgrade to the previous version of the rack-reverse-proxy that worked for you. I would recommend doing that, because I don't have enough information on how to troubleshoot this problem.

I can't access blog.mywebsite.com. Could you give me the real URL that you are having problems with?

@ManuelFrigerio
Copy link
Author

Hi, how can I downgrade to a previous version?
My blog is at blog.maitreapp.co

@ManuelFrigerio
Copy link
Author

I downgraded the gem by using

gem 'rack-reverse-proxy', '~> 0.11.0', :require => "rack/reverse_proxy"

and the problem is still there... ideas?

@ManuelFrigerio
Copy link
Author

@waterlink any help? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants