Apache Css and image file not found

Viewed 39

I'm desperate,

Here is my structure:

bee-school /
     public/
            img / default.jpg
            css / reset.css main.css

I have an apache server under ubuntu for my application, here is my virtualhost:

<VirtualHost *: 80>

    ServerName bee-school.local
    DocumentRoot / var / www / bee-school


    <Directory "/ var / www / bee-school">
            Options -Indexes + FollowSymLinks
            AllowOverride All
            Require all granted

    </Directory>

    ErrorLog /var/log/apache2/error.bee-school.dev.log
    CustomLog /var/log/apache2/access.bee-school.dev.log combined

here is my .htaccess:

RewriteEngine on

RewriteCond $ {REQUEST_FILENAME}!-f
RewriteRule ^ (. *) $ Public/index.php?Url=$1 [QSA,L]

Here is my article page:

<h1> The latest articles </h1>

<div class = "card-group">

  <? php foreach ($ posts as $ post):?>
  <div class = "card m-3">
    <img src = "img / default.jgp" alt = "Article image" class = "card-img-top">
    <div class = "card-body">
      <h4 class = "card-title"> <? = $ post-> title?> </h4>
      <p class = "card-text"> <? = $ post-> content?> </p>
      <p class = "card-text"> <small class = "text-muted"> Posted: <? = $ post-> created_at?> </small>      </p>
      <a href="posts/<?=$post-> id?> "class =" btn btn-primary "> Read more ... </a>
    </div>
  </div>
  <? php endforeach?>

</div>

but I still get this in my access.log file:

127.0.0.1 - - [17 / Jan / 2021: 22: 45: 35 +0000] "GET /public/css/reset.css HTTP / 1.1" 404 173 "http: //bee-school.local/posts" " Mozilla / 5.0 (X11; Ubuntu; Linux x86_64; rv: 84.0) Gecko / 20100101 Firefox / 84.0 "
127.0.0.1 - - [17 / Jan / 2021: 22: 45: 35 +0000] "GET //public/css/main.css HTTP / 1.1" 404 173 "http: //bee-school.local/posts" "Mozilla / 5.0 (X11; Ubuntu; Linux x86_64; rv: 84.0) Gecko / 20100101 Firefox / 84.0"
127.0.0.1 - - [17 / Jan / 2021: 22: 45: 35 +0000] "GET //public/css/awesome/css/font-awesome.min.css HTTP / 1.1" 404 173 "http: // bee-school.local / posts "" Mozilla / 5.0 (X11; Ubuntu; Linux x86_64; rv: 84.0) Gecko / 20100101 Firefox / 84.0 "
127.0.0.1 - - [17 / Jan / 2021: 22: 45: 35 +0000] "GET /img/default.jgp HTTP / 1.1" 404 173 "http: //bee-school.local/posts" "Mozilla / 5.0 (X11; Ubuntu; Linux x86_64; rv: 84.0) Gecko / 20100101 Firefox / 84.0 "

I really need help

0 Answers
Related