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

Correct Apache2.4 and PHP-FPM configuration (basic_auth not working) #4527

Closed
thePanz opened this issue Nov 28, 2014 · 1 comment
Closed

Comments

@thePanz
Copy link
Contributor

thePanz commented Nov 28, 2014

I am using Symfony 2.5.7 under PHP-PFM + Apache 2.4 under Ubuntu 14.04 (a simple Vagrant machine created with Puphpet.com).

The "basic_auth" is not working under this environment, even if using latest .htaccess file from master branch (in particular adding the lines: https://github.com/symfony/symfony-standard/blob/master/web/.htaccess#L21-23).

The solution is to correctly configure the Apache VirtualHost by adding:
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
as mentioned on StackOverflow (http://stackoverflow.com/a/17490827/435956).

Please update the documentation and the example provided online (http://symfony.com/doc/master/cookbook/configuration/web_server_configuration.html#using-mod-proxy-fcgi-with-apache-2-4)

@xabbuh
Copy link
Member

xabbuh commented Nov 28, 2014

Actually, I am not sure if we should add these lines. If we do so, we should add them as comments explaining that you would have to remove the comment characters to use it.

But, isn't this necessary code that belongs to the .htaccess file of the standard edition? If it is a specific configuration needed with PHP FPM and mod_proxy, using <IfModule> could be used to choose the proper context (the lines mentioned by @thePanz seem to do the same if used with mod_php, don't they?).

weaverryan pushed a commit that referenced this issue Dec 7, 2014
weaverryan added a commit that referenced this issue Dec 7, 2014
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #4528).

Discussion
----------

Update web_server_configuration.rst

Fixes for issue #4527

Commits
-------

f70dbf1 Update web_server_configuration.rst
0065791 Update web_server_configuration.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants