Skip to content

[Server Configuration] Clarify performance tip about symfony/apache-pack #12910

Closed
@fbastien

Description

@fbastien

In Configuring a Web Server page, Adding Rewrite Rules section, a tip says "A performance improvement can be achieved by moving the rewrite rules from the .htaccess file into the VirtualHost block of your Apache configuration".

I experienced the same issue as symfony/recipes-contrib#422, that is: if one simply moves .htaccess directives as direct children of the <VirtualHost> block, it won't work. They need to be nested into a <Directory> block for the DocumentRoot of the VirtualHost.

I lost a precious couple of hours because of ignoring this. I would have loved finding that issue much earlier, but to make it harder, all my files in DocumentRoot except index.php were symlinked, so I thought it was an issue about Apache Rewrite mod and symlinks.

So IMO the doc should either be more clear, specifying the Directory context requirement (preferred), or not saying that half-working tip at all. (I may create a PR if agreed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions