-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Hi,
While using sample configuration from https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html I have to comment out/remove following section to make css/js work:
location ~ \.(?:css|js|svg|gif|png|jpg|ico|wasm|tflite)$ {
try_files $uri /index.php$request_uri;
expires 6M; # Cache-Control policy borrowed from `.htaccess`
access_log off; # Optional: Don't log access to assets
location ~ \.wasm$ {
default_type application/wasm;
}
location ~ \.(?:css|js|svg|gif|png|jpg|ico|wasm|tflite)(\?v=.*)?$ {
add_header Cache-Control "public, max-age=15778463, immutable";
}
}
Otherwise, I get a lot of errors like the one below:
2022/02/23 22:47:18 [error] 127611#127611: *3 open() "/usr/share/webapps/nextcloud/css/icons/icons-vars.css" failed (2: No such file or directory), client: *******, server: *******, request: "GET /css/icons/icons-vars.css?v=1645532495 HTTP/2.0", host: "*******"
2022/02/23 22:47:18 [error] 127611#127611: *3 open() "/usr/share/webapps/nextcloud/css/icons/icons-vars.css" failed (2: No such file or directory), client: *******, server: *******, request: "GET /css/icons/icons-vars.css?v=1645532495 HTTP/2.0", host: "*******"
2022/02/23 22:47:18 [error] 127611#127611: *3 open() "/usr/share/webapps/nextcloud/wapps/deck/l10n/pl.js" failed (2: No such file or directory), client: *******, server: *******, request: "GET /wapps/deck/l10n/pl.js?v=4454ddee HTTP/2.0", host: "*******"
2022/02/23 22:47:18 [error] 127611#127611: *3 open() "/usr/share/webapps/nextcloud/wapps/deck/js/deck-collections.js" failed (2: No such file or directory), client: *******, server: *******, request: "GET /wapps/deck/js/deck-collections.js?v=4454ddee HTTP/2.0", host: "*******"
2022/02/23 22:47:18 [error] 127611#127611: *3 open() "/usr/share/webapps/nextcloud/wapps/contacts/l10n/pl.js" failed (2: No such file or directory), client: *******, server: *******, request: "GET /wapps/contacts/l10n/pl.js?v=4454ddee HTTP/2.0", host: "*******"
2022/02/23 22:47:18 [error] 127611#127611: *3 open() "/usr/share/webapps/nextcloud/wapps/contacts/js/contacts-files-action.js" failed (2: No such file or directory), client: *******, server: *******, request: "GET /wapps/contacts/js/contacts-files-action.js?v=4454ddee HTTP/2.0", host: "*******"
my config.php:
<?php
$CONFIG = array (
'instanceid' => '***********',
'passwordsalt' => '***********',
'datadirectory' => '/srv/nextcloud',
'dbtype' => 'mysql',
'version' => '23.0.2.1',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbtableprefix' => 'oc_',
'dbuser' => '***********',
'dbpassword' => '***********',
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\APCu',
'filelocking.enabled' => 'true',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/run/redis/redis-server.sock',
'port' => 0,
'dbindex' => 0,
'timeout' => 1.5,
),
'forcessl' => true,
'language' => 'pl',
'theme' => '',
'maintenance' => false,
'trashbin_retention_obligation' => 'auto, 90',
'enable_previews' => true,
'loglevel' => 0,
'log_rotate_size' => 10485760,
'log_rotate_sizerotation' => 104857600,
'default_phone_region' => 'PL',
'mysql.utf8mb4' => true,
'trusted_domains' =>
array (
0 => '***********',
),
'trusted_proxies' =>
array (
0 => '127.0.1.1',
1 => '127.0.0.1',
),
'secret' => '***********',
'forceSSLforSubdomains' => true,
'apps_paths' => [
[
'path' => '/usr/share/webapps/nextcloud/apps',
'url' => '/apps',
'writable' => false,
],
[
'path' => '/srv/nextcloud/apps',
'url' => '/myapps',
'writable' => true,
],
],
'appstore.experimental.enabled' => false,
'mail_smtpmode' => 'smtp',
'mail_from_address' => 'nextcloud',
'mail_domain' => '***********',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_smtphost' => '***********',
'mail_smtpport' => '465',
'mail_smtpsecure' => 'ssl',
'mail_smtpname' => '***********',
'mail_smtppassword' => '***********',
'logtimezone' => 'Europe/Warsaw',
'overwrite.cli.url' => '***********',
'app_install_overwrite' =>
array (
0 => 'ocsms',
),
'dbport' => '',
);