mwalbeck / docker-flox

Docker image for Flox
MIT License
4 stars 2 forks source link

No Styling / CSS loaded #2

Closed mjeni123 closed 1 year ago

mjeni123 commented 1 year ago

Hello, first of all thank you for providing the image.

I can start both containers (Flox/Web) without any warnings or errors, but the CSS is not loaded or applied when calling the website. If I go to the "unstyled" website by right-clicking on "Show source code", the CSS file is stored in the header under "" and is also accessible.

Do you have a suggestion where I should look for the error?

Flox-Container ENV:

FLOX_ADMIN_USER=mjeni FLOX_ADMIN_PASS=XXX FLOX_APP_URL=http://localhost TMDB_API_KEY=XXX FLOX_DB_INIT=true FLOX_DB_NAME=flox FLOX_DB_USER=flox FLOX_DB_PASS=XXX FLOX_DB_HOST=192.168.1.82 FLOX_DB_PORT=3306 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PHPIZE_DEPS=autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c PHP_INI_DIR=/usr/local/etc/php PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 PHP_LDFLAGS=-Wl,-O1 -pie GPG_KEYS=XXX7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312 PHP_VERSION=7.4.33 PHP_URL=https://www.php.net/distributions/php-7.4.33.tar.xz PHP_ASC_URL=https://www.php.net/distributions/php-7.4.33.tar.xz.asc PHP_SHA256=XXXX6abf93bc613815c55dd3f5809377813ac62a9ec4eb3778675b82a27b927 FLOX_DB_CONNECTION=mysql FLOX_APP_DEBUG=true

Nginx Container ENV:

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NGINX_VERSION=1.25.0 NJS_VERSION=0.7.12 PKG_RELEASE=1~bullseye

nginx.conf

events {} http{ server { listen [::]:80; listen 80; server_name localhost;

root /var/www/flox/public;

index index.php;

charset utf-8;

location ~ /\. {
    access_log off;
    log_not_found off;
    deny all;
}

location / {
    try_files $uri $uri/ /index.php?$query_string;
}

location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt  { access_log off; log_not_found off; }

error_page 404 /index.php;

location = /index.php {
    fastcgi_pass 192.168.1.84:9000;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    try_files $fastcgi_script_name =404;
    fastcgi_index index.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

location ~ \.php$ { return 403; }

} }

grafik

mjeni123 commented 1 year ago

Ok nevermind, i missed to setup a "mime.types" file on my nginx server. https://www.nginx.com/resources/wiki/start/topics/examples/full/ After ive createt the file, i just had to add the following to the "nginx.conf" under "http"

include ./mime.types;