I have set up a very simple thing, but it just won't work for some reason. The HTML document doesn't seem to be picking up on the CSS. When I click on the href attribute on line 6 in View Source, it shows me the file, so the browser can see it. I'm on the verge of losing my mind over this.
Here's what is being rendered.
And here's the code.
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="/css/master.css" />
</head>
<body>
<div id="wrapper">
test
</div>
</body>
</html>
CSS
#wrapper {
background: orange;
}
I initially thought it might be a server issue, so here's the apache config
<VirtualHost *:80>
ServerName adtest.dev
DocumentRoot /var/www/adtest.dev/
<Directory /var/www/adtest.dev/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/adtest.dev/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/adtest.dev/access.log combined
</VirtualHost>
and here's the output of ls -Rn
/var/www/adtest.dev$ ls -Rn
.:
total 8
drwxr-xr-x 2 1000 1000 4096 May 18 19:06 css
-rw-r--r-- 1 1000 1000 204 May 18 19:06 index.html
./css:
total 4
-rw-r--r-- 1 1000 1000 33 May 18 19:06 master.css
I must be missing something really obvious, right?
When I visit the site while running
tail -f /var/log/apache2/adtest.dev/access.log
, I only see 1 line.
[18/May/2014:19:28:43 +0000] "GET / HTTP/1.1" 200 503 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0"
If I directly go to the css file, I get
[18/May/2014:19:44:58 +0000] "GET /css/master.css HTTP/1.1" 200 314 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0"
The error log remains empty.