Magento 2 fresh install, admin page 404, css 404, js 404

Problem

I've got a fresh install of magento 2 on ubuntu 20.04. I followed the install with composer guide on the mangento site. The installer completed with no complaints.

When I head over to my url I get a very sparse looking page with no css or js. A look in the console and network tab shows that the page is trying to load a number of assets but non are found.

GET https://website.com/pub/static/version1606418294/frontend/Magento/luma/en_GB/css/styles-m.css
[HTTP/1.1 404 Not Found 58ms]

Looking into pub/static shows no directory called version1606418294 perhaps this is a clue?

In addition to this heading over to the admin URI that was generated on installation gives a 404 for the whole page.

Things I've Tried

changing mode between development / production / default

deploying static content and flushing the cache

php bin/magento setup:upgrade
bin/magento setup:static-content:deploy -f
bin/magento indexer:reindex
bin/magetno cache:flush

these are the current permissions

ls -la
total 1816
drwxrwxrwx 12 magento www-data   4096 Nov 26 19:16 .
drwxr-xr-x  4 root    root       4096 Nov 25 13:09 ..
-rwxrwxrwx  1 magento www-data    188 Nov 26 18:21 .editorconfig
-rwxrwxrwx  1 magento www-data  11281 Nov 26 19:16 .htaccess
-rwxrwxrwx  1 magento www-data  11382 Nov 26 18:21 .htaccess.sample
-rwxrwxrwx  1 magento www-data   1519 Nov 26 18:21 .php_cs.dist
-rwxrwxrwx  1 magento www-data    101 Nov 26 18:21 .user.ini
-rwxrwxrwx  1 magento www-data 766543 Nov 26 18:21 CHANGELOG.md
-rwxrwxrwx  1 magento www-data    650 Nov 26 18:21 COPYING.txt
-rwxrwxrwx  1 magento www-data   2994 Nov 26 18:21 Gruntfile.js.sample
-rwxrwxrwx  1 magento www-data  10364 Nov 26 18:21 LICENSE.txt
-rwxrwxrwx  1 magento www-data  10376 Nov 26 18:21 LICENSE_AFL.txt
-rwxrwxrwx  1 magento www-data    700 Nov 26 18:21 SECURITY.md
drwxrwxrwx  4 magento www-data   4096 Nov 26 18:21 app
-rwxrwxrwx  1 magento www-data    150 Nov 26 18:21 auth.json.sample
drwxrwxrwx  2 magento www-data   4096 Nov 26 18:21 bin
-rwxrwxrwx  1 magento www-data   2634 Sep 23 20:01 composer.json
-rwxrwxrwx  1 magento www-data 937015 Nov 26 18:21 composer.lock
drwxrwxrwx  4 magento www-data   4096 Nov 26 18:21 dev
drwxrwsrwx  3 magento www-data   4096 Nov 26 19:46 generated
-rwxrwxrwx  1 magento www-data     57 Nov 26 18:21 grunt-config.json.sample
-rwxrwxrwx  1 magento www-data   1370 Nov 26 18:21 index.php
drwxrwxrwx  4 magento www-data   4096 Nov 26 18:21 lib
-rwxrwxrwx  1 magento www-data   5842 Nov 26 18:21 nginx.conf.sample
-rwxrwxrwx  1 magento www-data   1416 Nov 26 18:21 package.json.sample
drwxrwxrwx  2 magento www-data   4096 Nov 26 18:21 phpserver
drwxrwxrwx  6 magento www-data   4096 Nov 26 18:21 pub
drwxrwxrwx  7 magento www-data   4096 Nov 26 18:21 setup
drwxrwsrwx  8 magento www-data   4096 Nov 26 19:46 var
drwxrwsrwx 84 magento www-data   4096 Nov 26 18:21 vendor

rewrite module is enabled

a2enmod rewrite 
Module rewrite already enabled

here's a list of php modules while im at it

php -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

I read that changing .htacces in the projects root folder to affect symlinks might help, though neither of those two options seems to make any difference.

 13 ############################################                                                                      
 12 ## enable rewrites                                                                                                
 11                                                                                                                   
 10 #    Options +FollowSymLinks                                                                                      
  9 Options +SymLinksIfOwnerMatch                                                                                     
  8                                                                                                                   
  7     RewriteEngine on                                                                                             

added the following to the bottom of /etc/apache2/sites-available/000-default.conf as per magento's trouble shooting instructions. here and here.

  4   <Directory /var/www/html>                                                                                       
  3           Options Indexes FollowSymLinks                                                                          
  2           AllowOverride all                                                                                       
  1           Require all granted                                                                                     
48    </Directory>    

I logged into mysql to see if magento is speaking to it but it seems to have made a whole bunch of tables so is probably ok?

mysql> show tables;
+------------------------------------------------------+
| Tables_in_magento                                    |
+------------------------------------------------------+
| admin_analytics_usage_version_log                    |
| admin_passwords                                      |
| admin_system_messages                                |
| admin_user                                           |
| admin_user_expiration                                |
| admin_user_session                                   |
| adminnotification_inbox     
.
.
.
| wishlist                                             |
| wishlist_item                                        |
| wishlist_item_option                                 |
| yotpo_order_status_history                           |
| yotpo_rich_snippets                                  |
| yotpo_sync                                           |
+------------------------------------------------------+
404 rows in set (0.02 sec)

I'm pretty much out of ideas, any insight or direction would be greatly appreciated.

Solutions

Have you tried

bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
Tags: Magento 2.x / Admin / Css

Similar questions

Fresh Magento 2 install admin does not give login box
I'm fairly new to Magento 2 and have been attempting to add a copy on my local machine (operating system: Windows 10) so that I can try out some database migration tests. I have installed XAMPP and proceeded with the installation instructions. I was then rewarded with the following screen: The actual site address seems to open a follows: However wh...
Magento 2.3 - Fresh install admin login error
I have recently installed magento 2.3.4 via softaculous app installer. Site works fine but while I try to login as admin its displays An error has happened during application run. See exception log for details. When I check it says [2020-03-05 14:15:16] main.CRITICAL: Warning: realpath(): open_basedir restriction in effect. File(/tmp) is not within...
Magento 2 fresh install, admin panel UI issue
I am new to Mangento. I just finished setting up Magento. Home page works fine however when I login to admin panel, it does not look good. Please check these screenshots. How can I fix this? Notice that the main body in all section is not displaying properly. Here are acreenshots https://imgur.com/a/b06BQHd
Fresh install can't login as admin
Today I have installed Magento via the DirectAdmin installer. The home page is working fine. When I login as admin I get this error: Warning: is_dir(): open_basedir restriction in effect. File(/etc/pki/tls/certs) is not within the allowed path(s): (/home/minergea/:/tmp:/var/tmp:/usr/local/lib/php/:/usr/local/php56/lib/php/) in /home/minergea/domain...
Fresh install, no plug ins, fatal error on category management page
We downloaded and installed the most recent 1.9 version. This time it seemed to work just fine, which is rare in my limited experience with magento installs. That is, until I tried to add some categories in the Admin. Clicking on the category management page creates a fatal error and I don't know how to interpret this. Any ideas what could be wrong...
Fresh Magento 1.9.1 install shows wrong price format in dropdown menus of configurable products
Every other place where the price is shown it is done in the correct 1.234,00 € (dot for thousands, comma for decimal) format except for dropdown menus of configurable products where the incorrect format of 1,234.00 € is shown. The language is set to German and sole selected currency is Euro. I have no idea what could be causing it. Is this a bug i...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.