title: Apache configuration. Apache access.log showing 404 for every subpage
body: <p>I need to set project locally for development that works in production in my job. Almost every page throw 404 f.e <a href="http://localhost/project1/producers/wear.html" rel="nofollow noreferrer">http://localhost/project1/producers/wear.html</a> . It happends on Ubuntu and Windows.</p>
  
  <p>My project locally sit under var/www/html/project1 and is visible under <a href="http://localhost/project1/" rel="nofollow noreferrer">http://localhost/project1/</a> , in job it is visible under <a href="http://project1/" rel="nofollow noreferrer">http://project1/</a></p>
  
  <p>log/apache2/access.log showing 404:</p>
  
  <pre><code>127.0.0.1 (..)"GET /project1/shop/clothing.html (..)" 404 17601 "http://localhost/project1/"(..)
  127.0.0.1 (..)"GET /public/css/font-awesome.min.css (..)" 404 521 "http://localhost/project1/shop/clothing.html"(..)
  127.0.0.1 (..)"GET /public/css/bootstrap.min.css (..)" 404 518 "http://localhost/project1/shop/clothing.html"(..)
  127.0.0.1 (..)"GET /public/js/jquery-2.1.4.min.js (..)" 404 518 "http://localhost/project1/shop/clothing.html"(..)
  127.0.0.1 (..)"GET /public/js/bootstrap.min.js (..)" 404 515 "http://localhost/project1/shop/clothing.html"(..)
  127.0.0.1 (..)"GET /public/js/base/frontend.js (..)" 404 515 "http://localhost/project1/shop/clothing.html"(..)
  127.0.0.1 (..)"GET /files/graphics/logo.png (..)" 404 512 "http://localhost/project1/shop/clothing.html"(..)
  </code></pre>
  
  <p>apache2.conf:</p>
  
  <pre><code>Mutex file:${APACHE_LOCK_DIR} default
  KeepAlive On
  MaxKeepAliveRequests 100
  KeepAliveTimeout 5
  User ${APACHE_RUN_USER}
  Group ${APACHE_RUN_GROUP}
  HostnameLookups Off
  IncludeOptional mods-enabled/*.load
  IncludeOptional mods-enabled/*.conf
  Include ports.conf
  
  &lt;Directory /&gt;
      Options FollowSymLinks
      AllowOverride All
      Require all denied
  &lt;/Directory&gt;
  
  &lt;Directory /usr/share&gt;
      AllowOverride All
      Require all granted
  &lt;/Directory&gt;
  
  &lt;Directory /var/www/&gt;
      Options Indexes FollowSymLinks
      AllowOverride All
      Require all granted
  &lt;/Directory&gt;
  
  AccessFileName .htaccess
  
  &lt;FilesMatch "^\.ht"&gt;
      Require all denied
  &lt;/FilesMatch&gt;
  IncludeOptional conf-enabled/*.conf
  
  IncludeOptional sites-enabled/*.conf
  </code></pre>
  
  <p>project1/.htaccess:</p>
  
  <pre><code>RewriteEngine On
  
  RewriteCond %{REQUEST_FILENAME} -s [OR]
  RewriteCond %{REQUEST_FILENAME} -l [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^.*$ - [NC,L]
  RewriteRule ^.*$ index.php [NC,L]
  
  &lt;IfModule pagespeed_module&gt;
      ModPagespeed off
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>project1/public/.htaccess:</p>
  
  <pre><code>Options -Indexes
  RewriteEngine off
  </code></pre>
  
  <p>project1/upload/.htaccess:</p>
  
  <pre><code>Options -Indexes
  RewriteEngine off
  </code></pre>
  
  <p>project1/system/.htaccess:</p>
  
  <pre><code>deny from all
  </code></pre>
  
  <p>project1/application/.htaccess (controllers, entities):</p>
  
  <pre><code>deny from all
  </code></pre>
  
  <p>also HTML style src are f.e.:</p>
  
  <pre><code>&lt;link rel="stylesheet" href="public/css/bootstrap.min.css"&gt;
  </code></pre>
  
  <hr>
  
  <p>edit:</p>
  
  <p>after putting in var/www/.htaccess:</p>
  
  <pre><code>RewriteEngine On
  
  RewriteCond %{REQUEST_FILENAME} -s [OR]
  RewriteCond %{REQUEST_FILENAME} -l [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^.*$ - [NC,L]
  RewriteRule ^(.*)$ /project1/$1 [R=301,NC,L]
  </code></pre>
  
  <p>I have access to styles, js files from in project1/public/:</p>
  
  <pre><code>127.0.0.1 "GET /project1/shop/supplements.html" 404 17608 "http://localhost/project1/new.html" 
  127.0.0.1 "GET /public/css/bootstrap.min.css" 301 626 "http://localhost/project1/shop/supplements.html" 
  127.0.0.1 "GET /public/js/jquery-2.1.4.min.js" 301 627 "http://localhost/project1/shop/supplements.html"
  127.0.0.1 "GET /project1/public/css/font-awesome.min.css" 200 6580 "http://localhost/project1/shop/supplements.html"
  127.0.0.1 "GET /project1/public/css/flag-icon.min.css" 200 3113 "http://localhost/project1/shop/supplements.html" 
  127.0.0.1 "GET /project1/public/css/ilightbox.css" 200 1848 "http://localhost/project1/shop/supplements.html" 
  127.0.0.1 "GET /public/js/base/frontend.js" 301 621 "http://localhost/project1/shop/supplements.html"
  127.0.0.1 "GET /project1/public/js/jquery.requestAnimationFrame.js" 200 1001 "http://localhost/project1/shop/supplements.html" 
  127.0.0.1 "GET /files/graphics/logo.png" 301 615 "http://localhost/project1/shop/supplements.html"
  127.0.0.1 "GET /project1/public/js/base/frontend.js" 200 1195 "http://localhost/project1/shop/supplements.html" 
  127.0.0.1 "GET /project1/public/fonts/materialdesignicons-webfont.woff2?v=1.7.22" 304 182 "http://localhost/project1/public/css/materialdesignicons.min.css"
  ::1 - - [11/Jun/2017:11:51:01 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g (internal dummy connection)"
  </code></pre>
  
  <p>but still every site in project is 404, f.e. <code>http://localhost/project1/bestsellers.html</code> log in access.log</p>
  
  <pre><code>127.0.0.1 "GET /project1/bestsellers.html HTTP/1.1" 404 17608 "http://localhost/project1/recommended.html" 
  </code></pre>
  
  <p>and every page throws <code>Uups... Page not found!</code> but with a STYLE! at least:)</p>