I have a Rails application running on a port 3101, and I made it available on the Internet through the installation of a reverse Apache proxy (for example, the Phusion suggested by this blog post .
I am using Devise + OmniAuth for Facebook authentication.
But when I try to authenticate via Facebook, I am redirected to the URL: http://mydomain.com:3101/my_callback_path
I run the rails application using passenger start -a 127.0.0.1 -p 3101 -d, and my Apache installation:
<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 found several answers like this and, but they are all designed to install Nginx.
OmniAuth.config.full_host = 'http://my domain.com', , apache (, ).
.