I have a Rails app running on port 3101
and I made it available to the internet through an Apache reverse-proxy setup (like the one suggested by Phusion on this blog post.
I'm using Devise + OmniAuth to handle the Facebook authentication.
But when I try to authenticate via Facebook, I'm redirected to the url: http://mydomain.com:3101/my_callback_path
I start the rails app with passenger start -a 127.0.0.1 -p 3101 -d
and my Apache setup is:
<VirtualHost *:80>
ServerName mydomain.com
PassengerEnabled off
ProxyPass / http://127.0.0.1:3101/
ProxyPassReverse / http://127.0.0.1:3101
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
</VirtualHost>
I've found some answers like this and this but they all are intended to Nginx setups.
I've tried to use an initializer with OmniAuth.config.full_host = 'http://my domain.com'
but I'm wondering if there`s not a missing configuration in my apache setup (like the previous answers).
Thanks in advance.