(we do not require you to code this, just advice how to solve the problem)
Hi
We are having a problem integrating facebook login (app built) for a website with sub-folders and require an expert in reverse proxies.
Our developer will implement your solution so all thats required is advice as to how to solve the problem.
We have 2 sub folders on our site and would like to have the login work for both sub-folders as individual logins
[login to view URL]
[login to view URL]
(in effect for them to be different sites for login purposes)
(so the login for /us would not work on /in and vice versa
..................
Symfony2 application on subdirectory using Apache Reverse Proxy - Login no longer works.
I'm using HWIOAuthBundle with FosUserBundle on Symfony 2.3 to connect users with their facebook account. Login via FB and regular login (using just FosUserBundle) work fine with a simple webserver setup (i.e. [login to view URL]).
The problem arises when I introduce a reverse proxy setup with the symfony2 app now being served on a subdirectory i.e. [login to view URL]). I've followed the implementation of HWIOAuthBundle as here [login to view URL] and I use the javascript from the official documentation to create the button to connect to Facebook.
In the reverse proxy scenario, the authentication and connection dialogue with FB works as expected, but when you are returned back to the reverse proxy app, the Facebook session data can't be read by the web server behind the proxy (the app does not "see" any of the fb authentication data).
An error also occurs when using the FosUserBundle authentication with the app citing that it can’t find the path for the login (it seems to look for the original url i.e. on [login to view URL] rather than [login to view URL])
My question is: is there a problem with my proxy setup (configs below) or does the app not work in this scenario without modification (as given here - [login to view URL])?
Thanks in advance.
The vhost config for the proxy server is
<VirtualHost *:80>
DocumentRoot /var/www/[login to view URL]
<Directory />
Options +FollowSymLinks
AllowOverride All
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) [login to view URL] [QSA,L]
</Directory>
ServerName [login to view URL]
ErrorLog /var/log/httpd/example.com-error_log
CustomLog /var/log/httpd/example.com-access_log common
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /app/ [login to view URL]
ProxyHTMLURLMap [login to view URL] /app/
<Location /app/>
ProxyPassReverse /
ProxyHTMLEnable On
ProxyHTMLURLMap / /app/
ProxyPassReverseCookiePath /app/ /
</Location>
</VirtualHost>
And the config for the app server is
<VirtualHost *:80>
DocumentRoot /var/www/[login to view URL]
ServerName [login to view URL]
ErrorLog /var/log/httpd/app.example.com-error_log
CustomLog /var/log/httpd/app.example.com-access_log common
<Directory />
Options +FollowSymLinks
AllowOverride None
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) [login to view URL] [QSA,L]
</Directory>
</VirtualHost>
I want to discuss this project with you further, let me know the best suitable time for you to schedule the meeting, Feel free to message me at any time, i used to be online 14 hrs in a day on this website so probably you will get a quick response from my end.
I've had a lot experience in case of networking and proxies. Also I've used many tools in this case like Apache, nginx, squid. I can help you in this case and we can discuss more on the chat.
Hi I am Linux system admin and I have 8 years exp. in Linux server and security and currently I am working in web hosting industries so please give me this chance. I will give you best support and solutions