CSS and JS 404 On Admin Site Only - New Install

by user1801810   Last Updated October 09, 2019 23:07 PM - source

This is a new server build...

[email protected]:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:    18.04
Codename:   bionic


[email protected]:~$ apache2 -v
Server version: Apache/2.4.29 (Ubuntu)
Server built:   2019-09-16T12:58:48

I downloaded the Drupal 8.7.8 tar.gz and installed using the Standard installation profile into an Apache VirtualHost. The visitor portion of the site displays and functions as expected, however the admin portion has issues. The main page, /admin, displays styled. However, clicking on the various links, Content, Structure, Appearance, etc, result in a page with no style. Inspect's Network tab shows...


Still in Inspect on the Network tab, the CSS files show a Status of "(cancelled)" and the JS files are all 404.

Maybe I have something wrong with URL rewriting. During installation in the "Requirements review" I received the warning about clean URLs - the server is capable but not enabled. Well, mod_rewrite is enabled and I have the following in my VirtualHost config...

RewriteEngine on
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]

With setting RewriteEngine off the visitor site only partially works. For example, the contact form is 404 while search works but has no CSS.

All other prerequisites passed.

I removed the whole Drupal filesystem and dropped the database. Another new installation yields the same results. Further suggesting that this is an Apache config issue.

Your time and help in resolving this is appreciated, thank you.

Related Questions

How to handle / cleanup obsolete aggregated css / js?

Updated December 29, 2017 15:07 PM

How to add Chosen JS library to theme?

Updated January 18, 2018 02:07 AM