Skip to content

Server static resources directly via webserver #12290

@MrSorcus

Description

@MrSorcus

Steps to reproduce

  1. Install Nextcloud.
  2. Create nginx config with location for static files
location ~ \.(css|js|svg|woff2?|ico|png)$ {
  try_files $uri =404;
}

Expected behaviour

All static resources (as css, js, woff, woff2, svg, etc.) must be separated from PHP backend.
Because current solution very slow. (VPS 1 CPU, 2GB RAM, SSD Drive)

Actual behaviour

Most resources can't be returned as static files with Nginx.
Directive try_files $uri =404; always return 404 for most of files.

Server configuration

Operating system: Archlinux latest

Web server: Nginx 1.15.5

Database: PostgreSQL 10.5

PHP version: 7.2.11

Nextcloud version: 14.0.3

Updated from an older Nextcloud/ownCloud or fresh install: Fresh install

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions