Skip to content

Nginx JSON not going to PHP interpreter #130

@htuscher

Description

@htuscher

The rule

root@3a0ed86c387c:/opt/docker/etc/nginx/vhost.common.d# cat 02-dev.conf
location ~* \.(css|js|gif|png|jpg|svg|json|xml)$ {
    expires    off;
    add_header Cache-Control private;
}

causes every json file to be served from disk, because nginx doesn't continue the rules to the default try_files with php, which causes some PHP applications e.g. Neos to stop working, because they serve dynamic content via foo/bar/some.json routes.

Either remove json from this rule or get nginx to also respect the php location.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions