Symfony HWIOAuthBundle、Facebook和;Apache反向代理不工作
我在Symfony 2.3上使用HWIOAuthBundle和FosUserBundle将用户与其facebook帐户连接起来。通过简单的Web服务器设置(例如example.com),一切都可以正常工作 当我使用symfony2应用程序引入反向代理设置时,问题就出现了。symfony2应用程序现在在一个子目录(即example.com/app)上提供服务。我在这里介绍了HWIOAuthBundle的实现,并使用官方文档中的javascript创建了连接Facebook的按钮 在反向代理场景中,与FB的身份验证和连接对话按预期工作,但当您返回反向代理应用程序时,代理后面的web服务器无法读取Facebook会话数据(应用程序无法“查看”任何FB身份验证数据) 我的问题是:我的代理设置(下面的配置)有问题吗?或者HWIOAuthBundle(或FB php sdk)在这种情况下没有修改就不能工作吗 代理服务器的vhost配置为Symfony HWIOAuthBundle、Facebook和;Apache反向代理不工作,symfony,facebook-php-sdk,reverse-proxy,mod-proxy,facebook-authentication,Symfony,Facebook Php Sdk,Reverse Proxy,Mod Proxy,Facebook Authentication,我在Symfony 2.3上使用HWIOAuthBundle和FosUserBundle将用户与其facebook帐户连接起来。通过简单的Web服务器设置(例如example.com),一切都可以正常工作 当我使用symfony2应用程序引入反向代理设置时,问题就出现了。symfony2应用程序现在在一个子目录(即example.com/app)上提供服务。我在这里介绍了HWIOAuthBundle的实现,并使用官方文档中的javascript创建了连接Facebook的按钮 在反向代理场景中,
<VirtualHost *:80>
DocumentRoot /var/www/www.followthatfund.com/web
<Directory />
Options +FollowSymLinks
AllowOverride All
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php [QSA,L]
</Directory>
ServerName example.com
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/ http://app.example.com/
ProxyHTMLURLMap http://app.example.com /app/
<Location /app/>
ProxyPassReverse /
ProxyHTMLEnable On
ProxyHTMLURLMap / /app/
ProxyPassReverseCookiePath /app/ /
</Location>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/app.example.com/current/web
ServerName app.example.com
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 ^(.*) app.php [QSA,L]
</Directory>
</VirtualHost>
DocumentRoot/var/www/www.followthatfund.com/web
选项+FollowSymLinks
允许超越所有
重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写规则^(.*)index.php[QSA,L]
ServerName example.com
ErrorLog/var/log/httpd/example.com-error\u log
CustomLog/var/log/httpd/example.com-access\u log common
代理请求关闭
命令拒绝,允许
通融
ProxyPass/应用程序/http://app.example.com/
ProxyHTMLMAPhttp://app.example.com /应用程序/
ProxyPassReverse/
可代理的
ProxyHtmlURL/应用程序/
ProxyPassReverseCookiePath/app//
应用服务器的配置为
<VirtualHost *:80>
DocumentRoot /var/www/www.followthatfund.com/web
<Directory />
Options +FollowSymLinks
AllowOverride All
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php [QSA,L]
</Directory>
ServerName example.com
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/ http://app.example.com/
ProxyHTMLURLMap http://app.example.com /app/
<Location /app/>
ProxyPassReverse /
ProxyHTMLEnable On
ProxyHTMLURLMap / /app/
ProxyPassReverseCookiePath /app/ /
</Location>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/app.example.com/current/web
ServerName app.example.com
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 ^(.*) app.php [QSA,L]
</Directory>
</VirtualHost>
DocumentRoot/var/www/app.example.com/current/web
ServerName app.example.com
ErrorLog/var/log/httpd/app.example.com-error\u log
CustomLog/var/log/httpd/app.example.com-access\u log common
选项+FollowSymLinks
不允许超限
重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写规则^(.*)app.php[QSA,L]