-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Improveme the apache/mod_php configuration example #6223
Conversation
# optionally disable the RewriteEngine for the asset directories | ||
# which will allow apache to simply reply with a 404 when files are | ||
# not found instead of passing the request into the full symfony stack | ||
<Directory /var/www/project/web/bundles> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has to be indented 2 spaces back (to be in the same column as the start of the comment)
I know almost nothing about Apache config, but I agree with your description and comments in the code. So 👍 from me |
<Directory /var/www/project/web/bundles> | ||
AllowOverride None | ||
Order Allow,Deny | ||
Allow from All |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These three lines should be removed (they are already covered by the Directory
container for the /var/www/project/web
path).
We recently had a project undergo a massive security scan. We had setup email error reporting, so symfony sent us ~15K emails all mostly route not found when the scanner was playing around in the bundles asset directory. In reality if a file isn't available in the bundles directory the server can simply return a 404 not found, and it is probably also slightly more secure and performant to not fire up the entire symfony framework in that case.
The latest PR/updated commit should address both comments. |
Thank you @gnat42. |
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #6223). Discussion ---------- Improveme the apache/mod_php configuration example We recently had a project undergo a massive security scan. We had setup email error reporting, so symfony sent us ~15K emails all mostly route not found when the scanner was playing around in the bundles asset directory. In reality if a file isn't available in the bundles directory the server can simply return a 404 not found, and it is probably also slightly more secure and performant to not fire up the entire symfony framework in that case. Commits ------- 67b661e Improvement to the apache/mod_php configuration example
We recently had a project undergo a massive security scan. We had setup email error reporting, so symfony sent us ~15K emails all mostly route not found when the scanner was playing around in the bundles asset directory. In reality if a file isn't available in the bundles directory the server can simply return a 404 not found, and it is probably also slightly more secure and performant to not fire up the entire symfony framework in that case.