Zitat von
Wusch
Jopp es lag dann an fehlerhaften nginx Einstellungen. Die Bilder wurden nicht direkt durch die index.php bedient. Dadurch konnten keine assets erstellt werden.
Welche Einstellung war es den?
Ich habe auch das "assets Problem" und habe schon quasi alles ausprobiert
System:
- nginx
- contao 4.8.1 (von 4.6.x update gemacht)
Der assets Ordner ist verlinkt und ist auch erreichbar. Ebenfalls wird der deferred ordner mit den json Dateien erstellt, jedoch keine Bilder dazu. Die 0-9, abcde Ordner bleiben leer. In Frontend/Backend bekomme ich jeweils 404 Fehler für die Bilder die einen assets Pfad haben. Alles andere funktioniert.
composer.json
Code:
{
"name": "contao/managed-edition",
"type": "project",
"description": "Contao Open Source CMS",
"license": "LGPL-3.0-or-later",
"authors": [
{
"name": "Leo Feyer",
"homepage": "https://github.com/leofeyer"
}
],
"require": {
"php": "^7.1",
"ext-dom": "*",
"ext-gd": "*",
"ext-intl": "*",
"ext-json": "*",
"ext-pcre": "*",
"ext-pdo": "*",
"ext-zlib": "*",
"contao/calendar-bundle": "^4.8",
"contao/comments-bundle": "^4.8",
"contao/conflicts": "*@dev",
"contao/faq-bundle": "^4.8",
"contao/listing-bundle": "^4.8",
"contao/manager-bundle": "4.8.*",
"contao/news-bundle": "^4.8",
"contao/newsletter-bundle": "^4.8",
"madeyourday/contao-rocksolid-antispam": "^2.0",
"madeyourday/contao-rocksolid-columns": "^2.0",
"madeyourday/contao-rocksolid-custom-elements": "^2.2",
"madeyourday/contao-rocksolid-icon-picker": "^2.0",
"madeyourday/contao-rocksolid-slider": "^2.0",
"menatwork/selectmodule": "^2.0",
"terminal42/contao-changelanguage": "^3.1"
},
"conflict": {
"contao-components/installer": "<1.3"
},
"require-dev": {
"sensiolabs/security-checker": "^5.0"
},
"extra": {
"symfony": {
"require": "^4.2"
},
"contao-component-dir": "assets"
},
"autoload": {
"psr-4": {
"App\": "src/"
}
},
"minimum-stability": "beta",
"prefer-stable": true,
"scripts": {
"post-install-cmd": [
"Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
],
"post-update-cmd": [
"Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
]
}
}
Relevante nginx conf
Code:
root /home/web/abc.com/public_html/web;
index app.php index.html index.htm;
location / {
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
expires max;
}
location /robots.txt {
add_header Content-Type text/plain;
}
index app.php;
try_files $uri @rewriteapp;
location ~ [^/]\.php(/|$) {
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
include /etc/nginx/fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
}
}
rewrite ^/app\.php/?(.*)$ /$1 permanent;
location @rewriteapp {
rewrite ^(.*)$ /app.php/$1 last;
}
p.s. die nginx minimal config für symphony hat das gleiche problem https://www.nginx.com/resources/wiki...cipes/symfony/
Lesezeichen