#StackBounty: #php #laravel-7 Laravel response 404 in all static files for generated URL

Bounty: 50

I’m using Laravel 7, PHP 7.4 running on docker with the following config:

FROM php:7.4-fpm

RUN apt-get update
RUN apt-get install -y autoconf pkg-config libssl-dev
RUN docker-php-ext-install bcmath sockets
RUN apt-get install -y libpq-dev 

RUN curl -sS https://getcomposer.org/installer | php 
        && mv composer.phar /usr/local/bin/ 
        && ln -s /usr/local/bin/composer.phar /usr/local/bin/composer

ENV COMPOSER_ALLOW_SUPERUSER 1

WORKDIR /website

ENTRYPOINT ["php", "-S", "0.0.0.0:8080", "-t", "/website"]

I stored all the assets in the directory: public/assets

All URL responses are 404 Not Found like the following image:

enter image description here

I generated the URL in the view with the following code:

<link rel="shortcut icon" href="{{ url('assets/images/favicon.ico') }}">
  • What is missing? Should I do some specific config?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.